Revert fix that issues Unauthorized exception
This reverts the fix to properly issue an Unauthorized exception [1] because it was a workaround, and the proper fix was made in oslo.incubator [2] and has been sync'd [3]. [1] I930fd61a896f62a2984cca1e4d40e5d89644aa3f [2] I3b9a20174da482f570d02319e68f46dcaa10ca9c [3] Iab799c8209872e2faa9ec6d33a426347b6478cce Change-Id: Ia3f5695f73bfff19a9f24117fa881e8d9ed039d3 Closes-Bug: #1402840
This commit is contained in:
parent
9db3fbfdf0
commit
7bc4afba48
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user