From 7777086aef41ac8264f0b15742361cfbb1365520 Mon Sep 17 00:00:00 2001 From: chkp-royl <51701986+chkp-royl@users.noreply.github.com> Date: Thu, 6 Oct 2022 16:25:58 +0300 Subject: [PATCH] handle broken pipe error (#49) --- cpapi/mgmt_api.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpapi/mgmt_api.py b/cpapi/mgmt_api.py index 393873b..5323121 100644 --- a/cpapi/mgmt_api.py +++ b/cpapi/mgmt_api.py @@ -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() diff --git a/setup.py b/setup.py index d767a4c..f233af3 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="cp-mgmt-api-sdk", - version="1.5.0", + version="1.6.0", author="API team", author_email="api_team@checkpoint.com", license='Apache 2.0',