From ae4355be01c0b4bcf5b6bdd2c1163b3f6df3e213 Mon Sep 17 00:00:00 2001 From: bhagyashris Date: Thu, 30 Jun 2016 18:34:14 +0530 Subject: [PATCH] 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 --- glanceclient/exc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glanceclient/exc.py b/glanceclient/exc.py index c8616c3e..eee47cac 100644 --- a/glanceclient/exc.py +++ b/glanceclient/exc.py @@ -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):