summaryrefslogtreecommitdiffstats
path: root/pyload/remote/thriftbackend
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote/thriftbackend')
-rw-r--r--pyload/remote/thriftbackend/Protocol.py2
-rw-r--r--pyload/remote/thriftbackend/Socket.py2
-rw-r--r--pyload/remote/thriftbackend/ThriftClient.py2
-rw-r--r--pyload/remote/thriftbackend/ThriftTest.py2
-rw-r--r--pyload/remote/thriftbackend/Transport.py4
5 files changed, 6 insertions, 6 deletions
diff --git a/pyload/remote/thriftbackend/Protocol.py b/pyload/remote/thriftbackend/Protocol.py
index a5822df18..417b45834 100644
--- a/pyload/remote/thriftbackend/Protocol.py
+++ b/pyload/remote/thriftbackend/Protocol.py
@@ -17,7 +17,7 @@ class Protocol(TBinaryProtocol.TBinaryProtocol):
str = self.trans.readAll(len)
try:
str = str.decode("utf8", "ignore")
- except:
+ except Exception:
pass
return str
diff --git a/pyload/remote/thriftbackend/Socket.py b/pyload/remote/thriftbackend/Socket.py
index b9fa7edbf..f6edc8408 100644
--- a/pyload/remote/thriftbackend/Socket.py
+++ b/pyload/remote/thriftbackend/Socket.py
@@ -10,7 +10,7 @@ from thrift.transport.TSocket import TSocket, TServerSocket, TTransportException
WantReadError = Exception #overwritten when ssl is used
-class SecureSocketConnection:
+class SecureSocketConnection(object):
def __init__(self, connection):
self.__dict__["connection"] = connection
diff --git a/pyload/remote/thriftbackend/ThriftClient.py b/pyload/remote/thriftbackend/ThriftClient.py
index 913719ed9..d7b0d2919 100644
--- a/pyload/remote/thriftbackend/ThriftClient.py
+++ b/pyload/remote/thriftbackend/ThriftClient.py
@@ -31,7 +31,7 @@ class NoConnection(Exception):
class NoSSL(Exception):
pass
-class ThriftClient:
+class ThriftClient(object):
def __init__(self, host="localhost", port=7227, user="", password=""):
self.createConnection(host, port)
diff --git a/pyload/remote/thriftbackend/ThriftTest.py b/pyload/remote/thriftbackend/ThriftTest.py
index aec20fa33..7243cc6f2 100644
--- a/pyload/remote/thriftbackend/ThriftTest.py
+++ b/pyload/remote/thriftbackend/ThriftTest.py
@@ -25,7 +25,7 @@ def bench(f, *args, **kwargs):
e = time()
try:
print "%s: %f s" % (f._Method__name, e-s)
- except:
+ except Exception:
print "%s: %f s" % (f.__name__, e-s)
return ret
diff --git a/pyload/remote/thriftbackend/Transport.py b/pyload/remote/thriftbackend/Transport.py
index b5b6c8104..7db4ba9d7 100644
--- a/pyload/remote/thriftbackend/Transport.py
+++ b/pyload/remote/thriftbackend/Transport.py
@@ -19,12 +19,12 @@ class TransportCompressed(TZlibTransport):
self.handle = trans.handle
self.remoteaddr = trans.handle.getpeername()
-class TransportFactory:
+class TransportFactory(object):
def getTransport(self, trans):
buffered = Transport(trans)
return buffered
-class TransportFactoryCompressed:
+class TransportFactoryCompressed(object):
_last_trans = None
_last_z = None