]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level...
authorAndrew M. Kuchling <amk@amk.ca>
Tue, 5 Sep 2006 13:15:41 +0000 (13:15 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Tue, 5 Sep 2006 13:15:41 +0000 (13:15 +0000)
Lib/SimpleXMLRPCServer.py

index 7a9f26faaaba5a2b14fa9bc5e00af6c7bd82c638..53ad9c5d220185b9b4710e07b29f143c799cc56f 100644 (file)
@@ -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