aboutsummaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-02-13 03:06:01 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-02-13 03:06:01 +0000
commit3bb7bbd91e98999740a42f582ffb7c46722c84cb (patch)
treefdb6c8f050428b6b35420f139b750d6078254d5e /util.py
parent2811409f1d067080c0a6f3b4d3161b7b3f63390d (diff)
Check locking first on set_current_vlan
Change-Id: Ib431d4858c24e1cd90248b9afc1fd1ebb482828c
Diffstat (limited to 'util.py')
-rw-r--r--util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.py b/util.py
index 714b3c4..35c3bb2 100644
--- a/util.py
+++ b/util.py
@@ -517,10 +517,10 @@ class VlanUtil:
port = db.get_port_by_id(port_id)
if port is None:
raise InputError("Port ID %d does not exist" % port_id)
- if port.is_trunk:
- raise InputError("Port ID %d is not an access port" % port_id)
if port.is_locked:
raise InputError("Port ID %d is locked" % port_id)
+ if port.is_trunk:
+ raise InputError("Port ID %d is not an access port" % port_id)
vlan = db.get_vlan_by_id(vlan_id)
if vlan is None: