Index: deluge/error.py===================================================================--- deluge/error.py (revision 2758)+++ deluge/error.py (working copy)@@ -31,6 +31,8 @@ # this exception statement from your version. If you delete this exception # statement from all source files in the program, then also delete it here.+import deluge.xmlrpclib+ class DelugeError(Exception): def __init__(self, value): self.value = value@@ -40,3 +42,14 @@ class NoCoreError(DelugeError): pass+class InvalidTorrent(DelugeError):+ pass++def from_xmlrpc_fault(fault):+ prefix = "deluge.error."+ string = fault.faultString+ string = string.replace(':', '(', 1) + ')'+ if string[:len(prefix)] == prefix:+ raise eval(string)+ pass+