summaryrefslogtreecommitdiffstats
path: root/pyload/remote/thriftbackend/ThriftClient.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
commite00ef98491f79ae8aa972ae1473dae4a7b78c07e (patch)
tree31be0c7cdcebb61525bcc387bcf15d265a1c494a /pyload/remote/thriftbackend/ThriftClient.py
parentFix except (diff)
downloadpyload-e00ef98491f79ae8aa972ae1473dae4a7b78c07e.tar.xz
Cleanup
Diffstat (limited to 'pyload/remote/thriftbackend/ThriftClient.py')
-rw-r--r--pyload/remote/thriftbackend/ThriftClient.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pyload/remote/thriftbackend/ThriftClient.py b/pyload/remote/thriftbackend/ThriftClient.py
index 26658e341..c779c9b9c 100644
--- a/pyload/remote/thriftbackend/ThriftClient.py
+++ b/pyload/remote/thriftbackend/ThriftClient.py
@@ -36,6 +36,7 @@ class NoSSL(Exception):
pass
class ThriftClient(object):
+
def __init__(self, host="localhost", port=7227, user="", password=""):
self.createConnection(host, port)
@@ -76,6 +77,7 @@ class ThriftClient(object):
self.transport.close()
raise WrongLogin
+
def createConnection(self, host, port, ssl=False):
self.socket = Socket(host, port, ssl)
self.transport = TTransport.TBufferedTransport(self.socket)
@@ -84,8 +86,10 @@ class ThriftClient(object):
protocol = Protocol(self.transport)
self.client = Pyload.Client(protocol)
+
def close(self):
self.transport.close()
+
def __getattr__(self, item):
return getattr(self.client, item)