aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/sw_bundle_workflow.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-02-18 17:07:47 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-02-18 17:07:47 +0000
commit011026903a94944258bf8c69aeb2700c6c57b02e (patch)
tree6d0426658a4a34d1d2af879170aaaad0db65695b /src/workflow/sw_bundle_workflow.py
parent0b48d9b6cb6941a9cecedc409ec0968d0b72ec62 (diff)
parent37620c753acf540e3c16364419617ebeb0388c5b (diff)
Merge "Fixed all Flake8 errors"
Diffstat (limited to 'src/workflow/sw_bundle_workflow.py')
-rw-r--r--src/workflow/sw_bundle_workflow.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/workflow/sw_bundle_workflow.py b/src/workflow/sw_bundle_workflow.py
index 80d1b3d..fd41018 100644
--- a/src/workflow/sw_bundle_workflow.py
+++ b/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():