diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-02-18 17:07:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-02-18 17:07:47 +0000 |
commit | 011026903a94944258bf8c69aeb2700c6c57b02e (patch) | |
tree | 6d0426658a4a34d1d2af879170aaaad0db65695b /src/workflow/workflow_manager.py | |
parent | 0b48d9b6cb6941a9cecedc409ec0968d0b72ec62 (diff) | |
parent | 37620c753acf540e3c16364419617ebeb0388c5b (diff) |
Merge "Fixed all Flake8 errors"
Diffstat (limited to 'src/workflow/workflow_manager.py')
-rw-r--r-- | src/workflow/workflow_manager.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/workflow/workflow_manager.py b/src/workflow/workflow_manager.py index 1d672cf..89a9d96 100644 --- a/src/workflow/workflow_manager.py +++ b/src/workflow/workflow_manager.py @@ -10,10 +10,8 @@ from django.http import JsonResponse -import random - from booking.models import Booking -from workflow.workflow_factory import WorkflowFactory, MetaStep +from workflow.workflow_factory import WorkflowFactory from workflow.models import Repository from resource_inventory.models import ( GenericResourceBundle, @@ -47,10 +45,15 @@ class SessionManager(): repo.set_defaults(defaults) repo.el[repo.HAS_RESULT] = False repo.el[repo.SESSION_USER] = self.owner - self.workflows.append(self.factory.create_workflow(workflow_type=workflow_type, repo = repo)) + self.workflows.append( + self.factory.create_workflow( + workflow_type=workflow_type, + repo=repo + ) + ) def pop_workflow(self): - if( len(self.workflows) <= 1 ): + if(len(self.workflows) <= 1): return False if self.workflows[-1].repository.el[self.workflows[-1].repository.HAS_RESULT]: @@ -70,7 +73,7 @@ class SessionManager(): responsejson["active"] = self.active_workflow().repository.el['active_step'] responsejson["workflow_count"] = len(self.workflows) return JsonResponse(responsejson, safe=False) - except Exception as e: + except Exception: pass def render(self, request, **kwargs): |