Merge "make ClientException.http_status default to None rather than 0"
This commit is contained in:
commit
26d29f5ce0
swiftclient
@ -1400,7 +1400,7 @@ class Connection(object):
|
||||
self.http_conn = None
|
||||
except ClientException as err:
|
||||
self._add_response_dict(caller_response_dict, kwargs)
|
||||
if self.attempts > self.retries:
|
||||
if self.attempts > self.retries or err.http_status is None:
|
||||
logger.exception(err)
|
||||
raise
|
||||
if err.http_status == 401:
|
||||
|
@ -17,9 +17,9 @@
|
||||
class ClientException(Exception):
|
||||
|
||||
def __init__(self, msg, http_scheme='', http_host='', http_port='',
|
||||
http_path='', http_query='', http_status=0, http_reason='',
|
||||
http_path='', http_query='', http_status=None, http_reason='',
|
||||
http_device='', http_response_content=''):
|
||||
Exception.__init__(self, msg)
|
||||
super(ClientException, self).__init__(msg)
|
||||
self.msg = msg
|
||||
self.http_scheme = http_scheme
|
||||
self.http_host = http_host
|
||||
|
Loading…
x
Reference in New Issue
Block a user