From 0d596d5686c6348b12e091d94ef638d0bdb3eb0f Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Wed, 30 Jan 2019 13:40:15 -0500 Subject: Fixed all Flake8 errors Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4 Signed-off-by: Parker Berberian --- dashboard/src/workflow/sw_bundle_workflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dashboard/src/workflow/sw_bundle_workflow.py') diff --git a/dashboard/src/workflow/sw_bundle_workflow.py b/dashboard/src/workflow/sw_bundle_workflow.py index 80d1b3d..fd41018 100644 --- a/dashboard/src/workflow/sw_bundle_workflow.py +++ b/dashboard/src/workflow/sw_bundle_workflow.py @@ -72,7 +72,7 @@ class Define_Software(WorkflowStep): host_profile = host.profile break excluded_images = Image.objects.exclude(owner=user).exclude(public=True) - excluded_images = excluded_images | Image.objects.exclude(host_type=host.profile) + excluded_images = excluded_images | Image.objects.exclude(host_type=host_profile) lab = self.repo_get(self.repo.SELECTED_GRESOURCE_BUNDLE).lab excluded_images = excluded_images | Image.objects.exclude(from_lab=lab) filter_data["id_form-" + str(i) + "-image"] = [] @@ -138,7 +138,7 @@ class Define_Software(WorkflowStep): q.filter(host_type=host.profile) q.filter(from_lab=lab) q.get(id=image.id) # will throw exception if image is not in q - except: + except Exception: self.metastep.set_invalid("Image " + image.name + " is not compatible with host " + host.resource.name) role = form.cleaned_data['role'] if "jumphost" in role.name.lower(): -- cgit 1.2.3-korg