aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/workflow_manager.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-01-30 13:40:15 -0500
committerParker Berberian <pberberian@iol.unh.edu>2019-02-12 13:40:30 -0500
commit37620c753acf540e3c16364419617ebeb0388c5b (patch)
treef624c3bda350729b83b23dd79c9d077c378f5ea3 /src/workflow/workflow_manager.py
parent33ce5acd438fbb81522fffeb81e2d1a58861b57f (diff)
Fixed all Flake8 errors
Change-Id: I1186429df8989461e2384f1f3e533c55cebfb1b4 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
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):