Commit a5453c48 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type}...

[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info().  Reported by Russell Warren
parent a60b60e7
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment