Browse Source

Remove redundant information from error message

Currently user get redundant HTTP error code in error message.
Removed redundant HTTP error code from the message.

For Example:
Error message display when user trying to get the non existing image:
$ glance image-show f433471a-53a8-4d31-bf8f-f0b6b594dfc
Error message:
404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc (HTTP 404)

After this fix:
HTTP 404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc

Closes-Bug: #1598714
Change-Id: I33971a2a16416c8538158299325471c2a69dbb3e
changes/51/475351/4
bhagyashris 5 years ago
parent
commit
ae4355be01
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      glanceclient/exc.py

+ 1
- 1
glanceclient/exc.py View File

@ -52,7 +52,7 @@ class HTTPException(ClientException):
self.details = details or self.__class__.__name__
def __str__(self):
return "%s (HTTP %s)" % (self.details, self.code)
return "HTTP %s" % (self.details)
class HTTPMultipleChoices(HTTPException):


Loading…
Cancel
Save