aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/workflow_manager.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/workflow_manager.py
parent0b48d9b6cb6941a9cecedc409ec0968d0b72ec62 (diff)
parent37620c753acf540e3c16364419617ebeb0388c5b (diff)
Merge "Fixed all Flake8 errors"
Diffstat (limited to 'src/workflow/workflow_manager.py')
-rw-r--r--src/workflow/workflow_manager.py15
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):