Update exception conditions in `_process_create_port
`
This is a follow-up patch to handle a missing comment. The except branch should never catch a ``AttributeError`` exception, only a ``KeyError`` if that is missing in the ``data`` dictionary. Related-Bug: #2013228 Change-Id: I6a3249649dde58e666048a613640338ea8af7b36
This commit is contained in:
parent
90ea96b290
commit
de40bfbafb
@ -41,7 +41,7 @@ class PortHardwareOffloadTypeDbMixin(object):
|
||||
if hw_type not in capabilities:
|
||||
capabilities.append(hw_type)
|
||||
data[portbindings.PROFILE]['capabilities'] = capabilities
|
||||
except (KeyError, AttributeError):
|
||||
except KeyError:
|
||||
data[portbindings.PROFILE] = {'capabilities': [hw_type]}
|
||||
|
||||
def _extend_port_dict(self, port_db, result):
|
||||
|
Loading…
x
Reference in New Issue
Block a user