X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=dashboard%2Fsrc%2Fdashboard%2Ftasks.py;fp=dashboard%2Fsrc%2Fdashboard%2Ftasks.py;h=597629fc5dcb82b0a3dd789496fdbef39af48861;hb=0d596d5686c6348b12e091d94ef638d0bdb3eb0f;hp=837e7a1b12a1dabd1a232e40f6b231bc6435ab37;hpb=8ef0c2df68848f7c185ba226a3bc788c39297bb3;p=pharos-tools.git 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)