diff options
author | bendikro <bendikro@gmail.com> | 2013-05-27 23:15:09 +0200 |
---|---|---|
committer | bendikro <bendikro@gmail.com> | 2013-05-27 23:39:43 +0200 |
commit | d91a9504aab61efe52fa238a2e6c33a7561bcf59 (patch) | |
tree | ac5d73596ca7a9a4f0d2120a1f7d8f29f460ce1c /deluge/ui/client.py | |
parent | 19234d65652e4071f330578fe56a16a38362795c (diff) | |
download | deluge-d91a9504aab61efe52fa238a2e6c33a7561bcf59.tar.gz deluge-d91a9504aab61efe52fa238a2e6c33a7561bcf59.tar.bz2 deluge-d91a9504aab61efe52fa238a2e6c33a7561bcf59.zip |
Fix bug introduced in 19234d
Diffstat (limited to 'deluge/ui/client.py')
-rw-r--r-- | deluge/ui/client.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 650dcfa45..a2a5136c7 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -152,12 +152,12 @@ class DelugeRPCProtocol(DelugeTransferProtocol): # Recreate exception and errback'it try: # The exception class is located in deluge.error - if hasattr(error, request[2]): + try: exception_cls = getattr(error, request[2]) exception = exception_cls(*request[3], **request[4]) - else: - # Shouldn't happen - raise Exception("Received invalid exception: %s", request[2]) + except TypeError, err: + log.warn("Received invalid RPC_ERROR (Old daemon?): %s", request[2]) + return # Ideally we would chain the deferreds instead of instance # checking just to log them. But, that would mean that any @@ -187,7 +187,6 @@ class DelugeRPCProtocol(DelugeTransferProtocol): # what's happening log.debug(msg) except: - # Failed probably because of invalid data (old daemon) import traceback log.error("Failed to handle RPC_ERROR (Old daemon?): %s\nLocal error: %s", request[2], traceback.format_exc()) d.errback(exception) |