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/workflow_manager.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'dashboard/src/workflow/workflow_manager.py') diff --git a/dashboard/src/workflow/workflow_manager.py b/dashboard/src/workflow/workflow_manager.py index 1d672cf..89a9d96 100644 --- a/dashboard/src/workflow/workflow_manager.py +++ b/dashboard/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): -- cgit 1.2.3-korg