summaryrefslogtreecommitdiff
path: root/lib/py/src
diff options
context:
space:
mode:
authorBryan Duxbury <bryanduxbury@apache.org>2011-01-26 17:54:02 +0000
committerBryan Duxbury <bryanduxbury@apache.org>2011-01-26 17:54:02 +0000
commite0498c984eae35b847f978cf24cf5dd88a16d3e9 (patch)
tree27a7dfe5eaac21d11ccd2d449b5df6659d391d21 /lib/py/src
parent6a084da48f1177eec38a6ddef982247cc343ff94 (diff)
downloadthrift-e0498c984eae35b847f978cf24cf5dd88a16d3e9.tar.gz
THRIFT-1049. py: Allow for TServerSocket python library to bind to a specific host
This patch adds a new host argument to TServerSocket that allows it to bind to a specific host. Patch: Jake Farrell git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1063806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'lib/py/src')
-rw-r--r--lib/py/src/transport/TSocket.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/py/src/transport/TSocket.py b/lib/py/src/transport/TSocket.py
index d77e358a2..085a5eef0 100644
--- a/lib/py/src/transport/TSocket.py
+++ b/lib/py/src/transport/TSocket.py
@@ -126,8 +126,8 @@ class TSocket(TSocketBase):
class TServerSocket(TSocketBase, TServerTransportBase):
"""Socket implementation of TServerTransport base."""
- def __init__(self, port=9090, unix_socket=None):
- self.host = None
+ def __init__(self, host=None, port=9090, unix_socket=None):
+ self.host = host
self.port = port
self._unix_socket = unix_socket
self.handle = None