mirror of https://github.com/docker/docker-py.git
fixed string formatting in errors
This commit is contained in:
parent
ea2148ade1
commit
dd1a6fc906
|
@ -30,15 +30,15 @@ class APIError(requests.exceptions.HTTPError):
|
|||
message = super(APIError, self).__str__()
|
||||
|
||||
if self.is_client_error():
|
||||
message = '%s Client Error: %s' % (
|
||||
message = '{0} Client Error: {1}'.format(
|
||||
self.response.status_code, self.response.reason)
|
||||
|
||||
elif self.is_server_error():
|
||||
message = '%s Server Error: %s' % (
|
||||
message = '{0} Server Error: {1}'.format(
|
||||
self.response.status_code, self.response.reason)
|
||||
|
||||
if self.explanation:
|
||||
message = '%s ("%s")' % (message, self.explanation)
|
||||
message = '{0} ("{1}")'.format(message, self.explanation)
|
||||
|
||||
return message
|
||||
|
||||
|
|
Loading…
Reference in New Issue