diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-18 17:07:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-02-18 17:07:47 +0000 |
commit | 16f1c65ac45a519a7ed710bca3068d6433fb2522 (patch) | |
tree | 9564805587db5513a73d7383804ac49787a32e88 /dashboard/src/account | |
parent | 55653461319fdc51bac52367a2776068165a4b6d (diff) | |
parent | 0d596d5686c6348b12e091d94ef638d0bdb3eb0f (diff) |
Merge "Fixed all Flake8 errors"
Diffstat (limited to 'dashboard/src/account')
-rw-r--r-- | dashboard/src/account/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dashboard/src/account/models.py b/dashboard/src/account/models.py index 0f8154e..4fc7c40 100644 --- a/dashboard/src/account/models.py +++ b/dashboard/src/account/models.py @@ -61,7 +61,7 @@ class VlanManager(models.Model): new_vlan = vlans.index(1) # will throw if none available vlans[new_vlan] = 0 allocated.append(new_vlan) - if count is 1: + if count == 1: return allocated[0] return allocated @@ -131,7 +131,7 @@ class VlanManager(models.Model): vlans = set(vlans) for vlan in vlans: - if my_vlans[vlan] is 0: + if my_vlans[vlan] == 0: raise ValueError("vlan " + str(vlan) + " is not available") my_vlans[vlan] = 0 |