diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-01-23 18:05:13 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-01-23 18:05:13 +0000 |
commit | 5b0de003d8514b941679c1c1825c31470a38c2f6 (patch) | |
tree | 41124b18c7ee09af99ebb7a9753c88690d5311df /util.py | |
parent | 10dc663d13528be064ba364e53c68d95ac790813 (diff) |
Fix string comparisons on port mode
"is not" doesn't work here. :-(
Change-Id: I6e9db2ab64a7b7468a705bc6a534a9ada209bd95
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -426,8 +426,8 @@ class VlanUtil: config = state.config # 1. Sanity-check inputs - if mode is not 'access' and mode is not 'trunk': - raise InputError("Port mode %s is not a valid option: try 'access' or 'trunk" % mode) + if mode != 'access' and mode != 'trunk': + raise InputError("Port mode '%s' is not a valid option: try 'access' or 'trunk'" % mode) port = db.get_port_by_id(port_id) if port is None: raise InputError("Port ID %d does not exist" % port_id) |