diff options
author | 2015-04-17 01:21:41 +0200 | |
---|---|---|
committer | 2015-04-17 01:21:41 +0200 | |
commit | 20226f8cc5889efbefa61209e1adf6184d42cd00 (patch) | |
tree | 8f01af2c23465432f83481b656ed8c2743cb872a /pyload/remote/thriftbackend/Socket.py | |
parent | Spare code cosmetics (2) (diff) | |
download | pyload-20226f8cc5889efbefa61209e1adf6184d42cd00.tar.xz |
Spare code cosmetics (3)
Diffstat (limited to 'pyload/remote/thriftbackend/Socket.py')
-rw-r--r-- | pyload/remote/thriftbackend/Socket.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pyload/remote/thriftbackend/Socket.py b/pyload/remote/thriftbackend/Socket.py index 7d078ab93..4dd66e368 100644 --- a/pyload/remote/thriftbackend/Socket.py +++ b/pyload/remote/thriftbackend/Socket.py @@ -13,29 +13,29 @@ WantReadError = Exception #: overwritten when ssl is used class SecureSocketConnection(object): def __init__(self, connection): - self.__dict__["connection"] = connection + self.__dict__['connection'] = connection def __getattr__(self, name): - return getattr(self.__dict__["connection"], name) + return getattr(self.__dict__['connection'], name) def __setattr__(self, name, value): - setattr(self.__dict__["connection"], name, value) + setattr(self.__dict__['connection'], name, value) def shutdown(self, how=1): - self.__dict__["connection"].shutdown() + self.__dict__['connection'].shutdown() def accept(self): - connection, address = self.__dict__["connection"].accept() + connection, address = self.__dict__['connection'].accept() return SecureSocketConnection(connection), address def send(self, buff): try: - return self.__dict__["connection"].send(buff) + return self.__dict__['connection'].send(buff) except WantReadError: sleep(0.1) return self.send(buff) @@ -43,7 +43,7 @@ class SecureSocketConnection(object): def recv(self, buff): try: - return self.__dict__["connection"].recv(buff) + return self.__dict__['connection'].recv(buff) except WantReadError: sleep(0.1) return self.recv(buff) |