From 3cf201fb6a9c9ee2c2923055a9ae1c96a13b09a4 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 31 Aug 2017 20:01:46 +0000 Subject: [PATCH] Catch attrbute error for other APIs Depending on the failure, ironic can return what gets translated to unicode, which can generate an AttributeError when the exception attempts to be examined to report the error, which suppresses the original error. Added AttributeError to the exception catch. Change-Id: I246c2e797a7ed22f990a264856c7cbda18be7ca5 --- shade/exc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shade/exc.py b/shade/exc.py index cda469f9c..c94489110 100644 --- a/shade/exc.py +++ b/shade/exc.py @@ -148,6 +148,9 @@ def raise_from_response(response, error_message=None): except ValueError: if response.reason: remote_error += " {reason}".format(reason=response.reason) + except AttributeError: + if response.reason: + remote_error += " {reason}".format(reason=response.reason) _log_response_extras(response)