]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix kwargs for NECDBException.
authorDan Prince <dprince@redhat.com>
Mon, 25 Mar 2013 17:46:15 +0000 (13:46 -0400)
committerDan Prince <dprince@redhat.com>
Mon, 25 Mar 2013 17:49:55 +0000 (13:49 -0400)
Updates the NEC plugin to use the correct kwargs when raising
NECDBException.

Fixes LP Bug #1159925.

Change-Id: I1e96d4ec65c1bc98d90d2eb9867fe39bbd505cdc

quantum/plugins/nec/db/api.py

index 298ecd267fcaaa6c0cc1ae58662e764f8c8145c3..a22e34d3fd8178ec852d142aae185ef7097045c2 100644 (file)
@@ -113,7 +113,7 @@ def add_ofc_item(session, resource, quantum_id, ofc_id, old_style=False):
             session.flush()
     except Exception as exc:
         LOG.exception(exc)
-        raise nexc.NECDBException
+        raise nexc.NECDBException(reason=exc.message)
     return item
 
 
@@ -189,7 +189,7 @@ def add_portinfo(session, id, datapath_id='', port_no=0,
             session.add(portinfo)
     except Exception as exc:
         LOG.exception(exc)
-        raise nexc.NECDBException
+        raise nexc.NECDBException(reason=exc.message)
     return portinfo