mirror of https://github.com/OpenKMIP/PyKMIP.git
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:
parent
3d2a7edc94
commit
eb2fee80e8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue