diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-01-30 13:40:15 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-12 13:40:30 -0500 |
commit | 0d596d5686c6348b12e091d94ef638d0bdb3eb0f (patch) | |
tree | 0b5ae08772b6a23bdd004931d6ca3de5df7b8e14 /dashboard/src/dashboard | |
parent | 8ef0c2df68848f7c185ba226a3bc788c39297bb3 (diff) |
Fixed all Flake8 errors
Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/dashboard')
-rw-r--r-- | dashboard/src/dashboard/populate_db_iol.py | 2 | ||||
-rw-r--r-- | dashboard/src/dashboard/tasks.py | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/dashboard/src/dashboard/populate_db_iol.py b/dashboard/src/dashboard/populate_db_iol.py index 4368520..916dd97 100644 --- a/dashboard/src/dashboard/populate_db_iol.py +++ b/dashboard/src/dashboard/populate_db_iol.py @@ -307,7 +307,7 @@ class Populator: size = 0 try: size = int(disk_data['size'].split('.')[0]) - except: + except Exception: size = int(disk_data['size'].split('.')[0][:-1]) DiskProfile.objects.create( size=size, diff --git a/dashboard/src/dashboard/tasks.py b/dashboard/src/dashboard/tasks.py index 837e7a1..597629f 100644 --- a/dashboard/src/dashboard/tasks.py +++ b/dashboard/src/dashboard/tasks.py @@ -11,7 +11,6 @@ from celery import shared_task from django.utils import timezone -from django.db.models import Q from booking.models import Booking from notifier.manager import NotificationHandler from api.models import Job, JobStatus, SoftwareRelation, HostHardwareRelation, HostNetworkRelation, AccessRelation @@ -41,7 +40,7 @@ def booking_poll(): if vlan.public: try: host.lab.vlan_manager.release_public_vlan(vlan.vlan_id) - except: # will fail if we already released in this loop + except Exception: # will fail if we already released in this loop pass else: vlans.append(vlan.vlan_id) |