diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Proxy.py | 8 | ||||
-rw-r--r-- | src/lib/Bcfg2/SSLServer.py | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Proxy.py b/src/lib/Bcfg2/Proxy.py index 72953ef3e..3b406c78e 100644 --- a/src/lib/Bcfg2/Proxy.py +++ b/src/lib/Bcfg2/Proxy.py @@ -91,7 +91,8 @@ class RetryMethod(xmlrpclib._Method): msg = "Server failure: %s" % err except CertificateError: err = sys.exc_info()[1] - msg = "Got unallowed commonName %s from server" % err.commonName + msg = "Got unallowed commonName %s from server" % \ + err.commonName except KeyError: err = sys.exc_info()[1] msg = "Server disallowed connection: %s" % err @@ -99,8 +100,9 @@ class RetryMethod(xmlrpclib._Method): err = sys.exc_info()[1] msg = err except: - err = sys.exc_info()[1] - msg = "Unknown failure: %s" % err + raise + etype, err = sys.exc_info()[:2] + msg = "Unknown failure: %s (%s)" % (err, etype.__name__) if msg: if final: self.log.error(msg) diff --git a/src/lib/Bcfg2/SSLServer.py b/src/lib/Bcfg2/SSLServer.py index 0b306da2f..fbcb0e347 100644 --- a/src/lib/Bcfg2/SSLServer.py +++ b/src/lib/Bcfg2/SSLServer.py @@ -182,7 +182,7 @@ class SSLServer(SocketServer.TCPServer, object): url = property(_get_url) -class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): +class XMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): """Component XML-RPC request handler. Adds support for HTTP authentication. @@ -265,7 +265,7 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): except: (etype, msg) = sys.exc_info()[:2] self.logger.error("Error sending 500 response (%s): %s" % - (etype, msg)) + (etype.__name__, msg)) raise else: # got a valid XML RPC response @@ -308,7 +308,8 @@ class XMLRPCRequestHandler (SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): etype, err = sys.exc_info()[:2] self.logger.error("Unknown error sending response to %s: " "%s (%s)" % - (self.client_address[0], err, etype)) + (self.client_address[0], err, + etype.__name__)) def finish(self): # shut down the connection |