From b0f8da6e2e992056483668c15d6d161e3f9af948 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 9 Mar 2015 17:31:27 +0900 Subject: [PATCH] portsecurity_db: Use is_attr_set instead of a home-grown equivalent Change-Id: I72003a856315067105bbb2b764b8b608a393cd42 --- neutron/db/portsecurity_db.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neutron/db/portsecurity_db.py b/neutron/db/portsecurity_db.py index 14423a46f..408950b81 100644 --- a/neutron/db/portsecurity_db.py +++ b/neutron/db/portsecurity_db.py @@ -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 -- 2.45.2