Ticket #4: foolscap-copiedremoteexception.hgexport.patch
| File foolscap-copiedremoteexception.hgexport.patch, 1.2 kB (added by strank, 2 years ago) |
|---|
-
a/foolscap/call.py
old new 820 820 821 821 return state 822 822 823 class CopiedRemoteException(Exception): 824 """I represent an exception thrown on the remote end 825 (real Exception, old-style instance, or string), 826 I am a base class for locally reconstructed Exceptions. 827 You can catch me in a try block if you want. 828 """ 829 823 830 class CopiedFailure(failure.Failure, copyable.RemoteCopyOldStyle): 824 831 # this is a RemoteCopyOldStyle because you can't raise new-style 825 832 # instances as exceptions. … … 887 894 888 895 assert isinstance(self.type, str) 889 896 typepieces = self.type.split(".") 890 class ExceptionLikeString :897 class ExceptionLikeString(CopiedRemoteException): 891 898 pass 892 899 self.type = ExceptionLikeString 893 900 self.type.__module__ = ".".join(typepieces[:-1])
