From 37620c753acf540e3c16364419617ebeb0388c5b Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Wed, 30 Jan 2019 13:40:15 -0500 Subject: Fixed all Flake8 errors Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4 Signed-off-by: Parker Berberian --- src/account/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/account') diff --git a/src/account/models.py b/src/account/models.py index 0f8154e..4fc7c40 100644 --- a/src/account/models.py +++ b/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 -- cgit 1.2.3-korg