[Python-checkins] r51744 - python/trunk/Lib/SimpleXMLRPCServer.py
andrew.kuchling
python-checkins at python.org
Tue Sep 5 15:15:42 CEST 2006
Author: andrew.kuchling
Date: Tue Sep 5 15:15:41 2006
New Revision: 51744
Modified:
python/trunk/Lib/SimpleXMLRPCServer.py
Log:
[Bug #1525469] SimpleXMLRPCServer still uses the sys.exc_{value,type} module-level globals instead of calling sys.exc_info(). Reported by Russell Warren
Modified: python/trunk/Lib/SimpleXMLRPCServer.py
==============================================================================
--- python/trunk/Lib/SimpleXMLRPCServer.py (original)
+++ python/trunk/Lib/SimpleXMLRPCServer.py Tue Sep 5 15:15:41 2006
@@ -264,8 +264,9 @@
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 @@
'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
More information about the Python-checkins
mailing list