diff --git a/opsgenie_sdk/api_client.py b/opsgenie_sdk/api_client.py index 96d851b..51dfc50 100644 --- a/opsgenie_sdk/api_client.py +++ b/opsgenie_sdk/api_client.py @@ -81,7 +81,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, wait=tenacity.wait_random_exponential(multiplier=configuration.back_off, max=configuration.retry_max_delay, min=configuration.retry_delay), - retry=(tenacity.retry_if_result(self.is_retry_enabled) and + retry=(tenacity.retry_if_result(self.is_retry_enabled) & ((tenacity.retry_if_exception_type(RetryableException)) | (tenacity.retry_if_exception_type(HTTPError))))) @@ -104,7 +104,7 @@ def __del__(self): self._pool.join() self._pool = None - def is_retry_enabled(self): + def is_retry_enabled(self, _): return self.configuration.retry_enabled @property