aboutsummaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-30 13:40:15 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-02-12 13:40:30 -0500
commit37620c753acf540e3c16364419617ebeb0388c5b (patch)
treef624c3bda350729b83b23dd79c9d077c378f5ea3 /src/api
parent33ce5acd438fbb81522fffeb81e2d1a58861b57f (diff)
Fixed all Flake8 errors
Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/api')
-rw-r--r--src/api/models.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/models.py b/src/api/models.py
index b14ea2f..30f0f75 100644
--- a/src/api/models.py
+++ b/src/api/models.py
@@ -42,7 +42,7 @@ class LabManagerTracker(object):
"""
try:
lab = Lab.objects.get(name=lab_name)
- except:
+ except Exception:
raise PermissionDenied("Lab not found")
if lab.api_token == token:
return LabManager(lab)
@@ -366,7 +366,7 @@ class AccessConfig(TaskConfig):
d['revoke'] = self.revoke
try:
d['context'] = json.loads(self.context)
- except:
+ except Exception:
pass
return d
@@ -753,7 +753,7 @@ class JobFactory(object):
job = None
try:
job = Job.objects.get(booking=booking)
- except:
+ except Exception:
job = Job.objects.create(status=JobStatus.NEW, booking=booking)
cls.makeHardwareConfigs(
hosts=hosts,
@@ -796,7 +796,7 @@ class JobFactory(object):
hardware_config = None
try:
hardware_config = HardwareConfig.objects.get(relation__host=host)
- except:
+ except Exception:
hardware_config = HardwareConfig()
relation = HostHardwareRelation()
@@ -839,7 +839,7 @@ class JobFactory(object):
network_config = None
try:
network_config = NetworkConfig.objects.get(relation__host=host)
- except:
+ except Exception:
network_config = NetworkConfig.objects.create()
relation = HostNetworkRelation()
@@ -878,5 +878,5 @@ class JobFactory(object):
software_relation = SoftwareRelation.objects.create(job=job, config=software_config)
software_relation.save()
return software_relation
- except:
+ except Exception:
return None