NSXV: use correct exception for NoResultFound

Change-Id: Icbe226e3ea86d16860c20d9b18ac49b6410f9de5
This commit is contained in:
Gary Kotton 2017-07-25 04:08:26 -07:00
parent 682e0de44b
commit 0aa4e06e40
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import os
import random
import six
from sqlalchemy import exc as db_base_exc
from sqlalchemy.orm import exc as sa_exc
import time
from oslo_config import cfg
@ -316,7 +317,7 @@ class EdgeManager(object):
nsxv_db.update_nsxv_router_binding(
context.session, binding['router_id'],
status=plugin_const.PENDING_DELETE)
except db_base_exc.NoResultFound:
except sa_exc.NoResultFound:
LOG.debug("Router binding %s does not exist.",
binding['router_id'])