Skip to content

Commit

Permalink
handle broken pipe error (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-royl authored Oct 6, 2022
1 parent 2a5e6b1 commit 7777086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpapi/mgmt_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def api_call(self, command, payload=None, sid=None, wait_for_task=True, timeout=
res = APIResponse("", False, err_message=err_message)
else:
res = APIResponse("", False, err_message=err)
except (http_client.CannotSendRequest, http_client.BadStatusLine, ConnectionAbortedError) as e:
except (http_client.CannotSendRequest, http_client.BadStatusLine, ConnectionAbortedError, BrokenPipeError, IOError) as e:
self.conn = self.create_https_connection()
self.conn.request("POST", url, _data, _headers)
response = self.conn.getresponse()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="cp-mgmt-api-sdk",
version="1.5.0",
version="1.6.0",
author="API team",
author_email="[email protected]",
license='Apache 2.0',
Expand Down

0 comments on commit 7777086

Please sign in to comment.