diff --git a/ironicclient/exc.py b/ironicclient/exc.py index 5b35ef070..da7be7307 100644 --- a/ironicclient/exc.py +++ b/ironicclient/exc.py @@ -60,14 +60,4 @@ def from_response(response, message=None, traceback=None, method=None, # to handle faultstring. response.json = lambda: {'error': error_body} - if (response.headers['Content-Type'].startswith('text/') and - not hasattr(response, 'text')): - # NOTE(clif_h): There seems to be a case in the - # openstack.common.apiclient.exceptions module where if the - # content-type of the response is text/* then it expects - # the response to have a 'text' attribute, but that - # doesn't always seem to necessarily be the case. - # This is to work around that problem. - response.text = '' - return exceptions.from_response(response, message, url)