Skip to content

Commit 7777086

Browse files
authored
handle broken pipe error (#49)
1 parent 2a5e6b1 commit 7777086

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpapi/mgmt_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout=
349349
res = APIResponse("", False, err_message=err_message)
350350
else:
351351
res = APIResponse("", False, err_message=err)
352-
except (http_client.CannotSendRequest, http_client.BadStatusLine, ConnectionAbortedError) as e:
352+
except (http_client.CannotSendRequest, http_client.BadStatusLine, ConnectionAbortedError, BrokenPipeError, IOError) as e:
353353
self.conn = self.create_https_connection()
354354
self.conn.request("POST", url, _data, _headers)
355355
response = self.conn.getresponse()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name="cp-mgmt-api-sdk",
6-
version="1.5.0",
6+
version="1.6.0",
77
author="API team",
88
author_email="[email protected]",
99
license='Apache 2.0',

0 commit comments

Comments
 (0)