mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-12 15:58:38 -05:00
flake8: comply with new E722 rule
This commit is contained in:
committed by
Ryan Petrello
parent
7538b4ce15
commit
67867cf0c8
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user