mirror of
https://github.com/openkmip/pykmip
synced 2025-12-25 20:53:23 +00:00
Stop logging tracebacks when we're about to reraise
At that point, it's up to the caller to decide whether a stack trace is appropriate; if the caller decides the connection error is recoverable, us logging a traceback will only confuse things. Also, prevent a TypeError during log interpolation by actually using the argument we were providing.
This commit is contained in:
@@ -131,7 +131,7 @@ class ProxyKmipClient(object):
|
||||
self.proxy.open()
|
||||
self._is_open = True
|
||||
except Exception as e:
|
||||
self.logger.exception("could not open client connection", e)
|
||||
self.logger.error("could not open client connection: %s", e)
|
||||
raise
|
||||
|
||||
def close(self):
|
||||
@@ -148,7 +148,7 @@ class ProxyKmipClient(object):
|
||||
self.proxy.close()
|
||||
self._is_open = False
|
||||
except Exception as e:
|
||||
self.logger.exception("could not close client connection", e)
|
||||
self.logger.error("could not close client connection: %s", e)
|
||||
raise
|
||||
|
||||
@is_connected
|
||||
|
||||
Reference in New Issue
Block a user