mirror of https://github.com/docker/docker-py.git
client: fix exception semantics in _raise_for_status (#2954)
We want "The above exception was the direct cause of the following exception:" instead of "During handling of the above exception, another exception occurred:" Signed-off-by: Maor Kleinberger <kmaork@gmail.com>
This commit is contained in:
parent
7168e09b16
commit
bb11197ee3
|
|
@ -267,7 +267,7 @@ class APIClient(
|
|||
try:
|
||||
response.raise_for_status()
|
||||
except requests.exceptions.HTTPError as e:
|
||||
raise create_api_error_from_http_exception(e)
|
||||
raise create_api_error_from_http_exception(e) from e
|
||||
|
||||
def _result(self, response, json=False, binary=False):
|
||||
assert not (json and binary)
|
||||
|
|
|
|||
Loading…
Reference in New Issue