From feda92ff0b28514b27e8e05713368962366c9fa4 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Mon, 28 Oct 2013 16:33:27 -0700 Subject: [PATCH] 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 --- neutronclient/v2_0/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py index e2f15d244..733f339af 100644 --- a/neutronclient/v2_0/client.py +++ b/neutronclient/v2_0/client.py @@ -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: