diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-09-05 13:15:41 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-09-05 13:15:41 (GMT) |
commit | a5453c48d56317c9abfd141461fd16f01274f45d (patch) | |
tree | 2135f8747f4d8fa679da038482d18d05a554e6ec /Lib/SimpleXMLRPCServer.py | |
parent | a60b60e72e1fa0a8a17c8e0857582a6fe1d2930e (diff) | |
download | cpython-a5453c48d56317c9abfd141461fd16f01274f45d.zip cpython-a5453c48d56317c9abfd141461fd16f01274f45d.tar.gz cpython-a5453c48d56317c9abfd141461fd16f01274f45d.tar.bz2 |
[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren
Diffstat (limited to 'Lib/SimpleXMLRPCServer.py')
-rw-r--r-- | Lib/SimpleXMLRPCServer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py index 7a9f26f..53ad9c5 100644 --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py @@ -264,8 +264,9 @@ class SimpleXMLRPCDispatcher: encoding=self.encoding) except: # report exception back to server + exc_type, exc_value, exc_tb = sys.exc_info() response = xmlrpclib.dumps( - xmlrpclib.Fault(1, "%s:%s" % (sys.exc_type, sys.exc_value)), + xmlrpclib.Fault(1, "%s:%s" % (exc_type, exc_value)), encoding=self.encoding, allow_none=self.allow_none, ) @@ -364,9 +365,10 @@ class SimpleXMLRPCDispatcher: 'faultString' : fault.faultString} ) except: + exc_type, exc_value, exc_tb = sys.exc_info() results.append( {'faultCode' : 1, - 'faultString' : "%s:%s" % (sys.exc_type, sys.exc_value)} + 'faultString' : "%s:%s" % (exc_type, exc_value)} ) return results |