mirror of https://github.com/docker/docker-py.git
fix: use response.text to get string rather than bytes
Signed-off-by: Mehmet Nuri Deveci <5735811+mndeveci@users.noreply.github.com>
This commit is contained in:
parent
84414e343e
commit
a6c3d24393
|
|
@ -27,7 +27,7 @@ def create_api_error_from_http_exception(e):
|
|||
try:
|
||||
explanation = response.json()['message']
|
||||
except ValueError:
|
||||
explanation = (response.content or '').strip()
|
||||
explanation = (response.text or '').strip()
|
||||
cls = APIError
|
||||
if response.status_code == 404:
|
||||
explanation_msg = (explanation or '').lower()
|
||||
|
|
|
|||
Loading…
Reference in New Issue