Merge "portsecurity_db: Use is_attr_set instead of a home-grown equivalent"

This commit is contained in:
Jenkins 2015-03-17 14:42:49 +00:00 committed by Gerrit Code Review
commit d409461ed1
1 changed files with 1 additions and 2 deletions

View File

@ -154,8 +154,7 @@ class PortSecurityDbMixin(object):
port['device_owner'].startswith('network:')):
return (False, has_ip)
if (psec.PORTSECURITY in port and
isinstance(port[psec.PORTSECURITY], bool)):
if attrs.is_attr_set(port.get(psec.PORTSECURITY)):
port_security_enabled = port[psec.PORTSECURITY]
# If port has an ip and security_groups are passed in