flake8: comply with new E722 rule

This commit is contained in:
AlanCoding
2017-10-23 13:57:12 -04:00
committed by Ryan Petrello
parent 7538b4ce15
commit 67867cf0c8
17 changed files with 30 additions and 30 deletions
+2 -2
View File
@@ -437,7 +437,7 @@ def group_factory(inventory):
def g(name):
try:
return Group.objects.get(name=name, inventory=inventory)
except:
except Exception:
return Group.objects.create(inventory=inventory, name=name)
return g
@@ -478,7 +478,7 @@ def inventory_source_factory(inventory_factory):
source = 'file'
try:
return inventory.inventory_sources.get(name=name)
except:
except Exception:
return inventory.inventory_sources.create(name=name, source=source)
return invsrc