Merge "Use e.exc_type instead of calling str on exception"

Jenkins 2017-06-12 19:24:06 +00:00 committed by Gerrit Code Review
commit 016a809e4f
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class _TrunkAPI(object):
except resources_rpc.ResourceNotFound:
return None
except oslo_messaging.RemoteError as e:
if 'CallbackNotFound' not in str(e):
if e.exc_type != 'CallbackNotFound':
LOG.debug("Trunk plugin disabled on server. Assuming port %s is "
"not a trunk.", port_id)