diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-27 23:45:45 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-27 23:45:45 +0200 |
commit | 0c1a92dcfa6d9775d5d0da8ef5fc8d9cc40d77b9 (patch) | |
tree | 0fb4ed212d1e9e8d48c30d69644a774eb2424b23 /module/lib/thrift/transport/TSocket.py | |
parent | little cli improvement (diff) | |
download | pyload-0c1a92dcfa6d9775d5d0da8ef5fc8d9cc40d77b9.tar.xz |
thrift 0.7.0 from trunk, patched for low mem usage
Diffstat (limited to 'module/lib/thrift/transport/TSocket.py')
-rw-r--r-- | module/lib/thrift/transport/TSocket.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/lib/thrift/transport/TSocket.py b/module/lib/thrift/transport/TSocket.py index d77e358a2..be6167802 100644 --- a/module/lib/thrift/transport/TSocket.py +++ b/module/lib/thrift/transport/TSocket.py @@ -57,7 +57,7 @@ class TSocket(TSocketBase): self.handle = h def isOpen(self): - return self.handle != None + return self.handle is not None def setTimeout(self, ms): if ms is None: @@ -65,7 +65,7 @@ class TSocket(TSocketBase): else: self._timeout = ms/1000.0 - if (self.handle != None): + if self.handle is not None: self.handle.settimeout(self._timeout) def open(self): @@ -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 |