Merge "NSXV: use correct exception for NoResultFound"
This commit is contained in:
commit
72e15a14de
@ -35,6 +35,7 @@ from oslo_utils import uuidutils
|
|||||||
import six
|
import six
|
||||||
from six import moves
|
from six import moves
|
||||||
from sqlalchemy import exc as db_base_exc
|
from sqlalchemy import exc as db_base_exc
|
||||||
|
from sqlalchemy.orm import exc as sa_exc
|
||||||
|
|
||||||
from vmware_nsx._i18n import _
|
from vmware_nsx._i18n import _
|
||||||
from vmware_nsx.common import config as conf
|
from vmware_nsx.common import config as conf
|
||||||
@ -300,7 +301,7 @@ class EdgeManager(object):
|
|||||||
nsxv_db.update_nsxv_router_binding(
|
nsxv_db.update_nsxv_router_binding(
|
||||||
context.session, binding['router_id'],
|
context.session, binding['router_id'],
|
||||||
status=constants.PENDING_DELETE)
|
status=constants.PENDING_DELETE)
|
||||||
except db_base_exc.NoResultFound:
|
except sa_exc.NoResultFound:
|
||||||
LOG.debug("Router binding %s does not exist.",
|
LOG.debug("Router binding %s does not exist.",
|
||||||
binding['router_id'])
|
binding['router_id'])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user