diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 17:20:59 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-13 17:20:59 +0200 |
commit | e00ef98491f79ae8aa972ae1473dae4a7b78c07e (patch) | |
tree | 31be0c7cdcebb61525bcc387bcf15d265a1c494a /pyload/remote/thriftbackend/ThriftClient.py | |
parent | Fix except (diff) | |
download | pyload-e00ef98491f79ae8aa972ae1473dae4a7b78c07e.tar.xz |
Cleanup
Diffstat (limited to 'pyload/remote/thriftbackend/ThriftClient.py')
-rw-r--r-- | pyload/remote/thriftbackend/ThriftClient.py | 4 |
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) |