diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-18 00:29:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-18 00:29:55 +0200 |
commit | bb5a115533711fd8bb87f53cb32ff7342137208d (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/remote/thriftbackend | |
parent | PEP-8, Python Zen, refactor and reduce code (part 6 in master module/common) (diff) | |
download | pyload-bb5a115533711fd8bb87f53cb32ff7342137208d.tar.xz |
Spare code cosmetics (5)
Diffstat (limited to 'pyload/remote/thriftbackend')
-rw-r--r-- | pyload/remote/thriftbackend/Protocol.py | 1 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/ThriftTest.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pyload/remote/thriftbackend/Protocol.py b/pyload/remote/thriftbackend/Protocol.py index cc5352d40..ecf0680ad 100644 --- a/pyload/remote/thriftbackend/Protocol.py +++ b/pyload/remote/thriftbackend/Protocol.py @@ -27,6 +27,7 @@ class Protocol(TBinaryProtocol.TBinaryProtocol): class ProtocolFactory(TBinaryProtocol.TBinaryProtocolFactory): + def getProtocol(self, trans): prot = Protocol(trans, self.strictRead, self.strictWrite) return prot diff --git a/pyload/remote/thriftbackend/ThriftTest.py b/pyload/remote/thriftbackend/ThriftTest.py index fb8dd03c9..0c5ea4783 100644 --- a/pyload/remote/thriftbackend/ThriftTest.py +++ b/pyload/remote/thriftbackend/ThriftTest.py @@ -22,9 +22,10 @@ from time import time import xmlrpclib + def bench(f, *args, **kwargs): s = time() - ret = [f(*args, **kwargs) for i in range(0, 100)] + ret = [f(*args, **kwargs) for _i in range(0, 100)] e = time() try: print "%s: %f s" % (f._Method__name, e-s) |