mirror of
https://github.com/openkmip/pykmip
synced 2025-12-27 13:43:27 +00:00
Updating the ProxyKmipClient to simplify closing
This change updates the ProxyKmipClient close method, allowing it to be called without error even when the client connection is not open. The client unit tests have been updated to reflect this.
This commit is contained in:
@@ -134,11 +134,10 @@ class ProxyKmipClient(api.KmipClient):
|
||||
Close the client connection.
|
||||
|
||||
Raises:
|
||||
ClientConnectionNotOpen: if the client connection is not open
|
||||
Exception: if an error occurs while trying to close the connection
|
||||
"""
|
||||
if not self._is_open:
|
||||
raise exceptions.ClientConnectionNotOpen()
|
||||
return
|
||||
else:
|
||||
try:
|
||||
self.proxy.close()
|
||||
|
||||
Reference in New Issue
Block a user