Fix status_code not passed in code

The python-neutronclient was refactored to raise NeutronClientException
and when that occured the status_code field was dropped. This causes errors
on the nova-side to occur as nova checks the status_code to do error handling.

Fixes bug: 1245700

Change-Id: Ie1fcf3fef0e20c33ce18549bca6a2413a9f98e9f
This commit is contained in:
Aaron Rosen 2013-10-28 16:33:27 -07:00
parent a8c5c650ea
commit feda92ff0b
1 changed files with 2 additions and 3 deletions

View File

@ -73,9 +73,8 @@ def exception_handler_v20(status_code, error_content):
ex = None
try:
# raise the appropriate error!
ex = neutron_errors[error_type](message=error_message)
ex.args = ([dict(status_code=status_code,
message=error_message)], )
ex = neutron_errors[error_type](message=error_message,
status_code=status_code)
except Exception:
pass
if ex: