diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:07:33 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:07:33 +0200 |
commit | 730b160e28d711fad96e6a61070e374ad0966566 (patch) | |
tree | fe3f8cf4161de8f93cddf29ea49464b493083e2b /pyload/remote/thriftbackend | |
parent | Spare code cosmetics (1) (diff) | |
download | pyload-730b160e28d711fad96e6a61070e374ad0966566.tar.xz |
Spare code cosmetics (2)
Diffstat (limited to 'pyload/remote/thriftbackend')
-rw-r--r-- | pyload/remote/thriftbackend/Processor.py | 3 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/Protocol.py | 4 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/thriftgen/pyload/constants.py | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/pyload/remote/thriftbackend/Processor.py b/pyload/remote/thriftbackend/Processor.py index 24a0c05b6..7ccc2bee2 100644 --- a/pyload/remote/thriftbackend/Processor.py +++ b/pyload/remote/thriftbackend/Processor.py @@ -2,6 +2,7 @@ from pyload.remote.thriftbackend.thriftgen.pyload import Pyload + class Processor(Pyload.Processor): def __init__(self, *args, **kwargs): @@ -66,7 +67,7 @@ class Processor(Pyload.Processor): self._processMap[name](self, seqid, iprot, oprot) else: - #no permission + # no permission iprot.skip(Pyload.TType.STRUCT) iprot.readMessageEnd() # 21 - Not authorized diff --git a/pyload/remote/thriftbackend/Protocol.py b/pyload/remote/thriftbackend/Protocol.py index c020e7a23..cc5352d40 100644 --- a/pyload/remote/thriftbackend/Protocol.py +++ b/pyload/remote/thriftbackend/Protocol.py @@ -2,12 +2,13 @@ from thrift.protocol import TBinaryProtocol + class Protocol(TBinaryProtocol.TBinaryProtocol): def writeString(self, str): try: str = str.encode("utf8", "ignore") - except Exception, e: + except Exception: pass self.writeI32(len(str)) @@ -26,7 +27,6 @@ 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/thriftgen/pyload/constants.py b/pyload/remote/thriftbackend/thriftgen/pyload/constants.py index 3bdd64cc1..e0a811c8a 100644 --- a/pyload/remote/thriftbackend/thriftgen/pyload/constants.py +++ b/pyload/remote/thriftbackend/thriftgen/pyload/constants.py @@ -8,3 +8,4 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * + |