aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/db.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/db.py b/db/db.py
index dd4ba91..6d557aa 100644
--- a/db/db.py
+++ b/db/db.py
@@ -372,7 +372,7 @@ class VlanDB:
if port is None:
raise InputError("Port ID %d does not exist" % int(port_id))
- if port["is_trunk"] or port["is_locked"]:
+ if port.is_trunk or port.is_locked:
raise CriticalError("The port is locked")
vlan = self.get_vlan_by_id(vlan_id)
@@ -395,7 +395,7 @@ class VlanDB:
if port is None:
raise InputError("Port ID %d does not exist" % int(port_id))
- if port["is_trunk"] or port["is_locked"]:
+ if port.is_trunk or port.is_locked:
raise CriticalError("The port is locked")
try: