From d19c692ad2f0a00beb4d892d2a165bdd270b1446 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 21 Jun 2018 11:49:25 +0200 Subject: Fix a few issues pointed out by pylint --- crocoite/task.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crocoite/task.py') diff --git a/crocoite/task.py b/crocoite/task.py index 9054627..6b3c9d1 100644 --- a/crocoite/task.py +++ b/crocoite/task.py @@ -39,7 +39,7 @@ from celery import Celery from celery.utils.log import get_task_logger from .browser import ChromeService, BrowserCrashed -from .controller import SinglePageController, ControllerSettings, RecursiveController, defaultSettings, DepthLimit, PrefixLimit, StatsHandler +from .controller import SinglePageController, ControllerSettings, RecursiveController, defaultSettings, DepthLimit, StatsHandler from . import behavior from .cli import parseRecursive from .warc import WarcHandler @@ -82,9 +82,9 @@ def archive (self, url, settings, enabledBehaviorNames): enabledBehavior = list (filter (lambda x: x.name in enabledBehaviorNames, behavior.available)) settings = ControllerSettings (**settings) try: - controller = SinglePageController (url, fd, behavior=enabledBehavior, + c = SinglePageController (url, fd, behavior=enabledBehavior, settings=settings, handler=handler) - controller.run () + c.run () except BrowserCrashed: # nothing we can do about that logger.error ('browser crashed for {}'.format (url)) @@ -137,9 +137,9 @@ def controller (self, url, settings, enabledBehaviorNames, recursive, concurrenc recursionPolicy = parseRecursive (recursive, url) enabledBehavior = list (filter (lambda x: x.name in enabledBehaviorNames, behavior.available)) settings = ControllerSettings (**settings) - controller = DistributedRecursiveController (url, None, behavior=enabledBehavior, + c = DistributedRecursiveController (url, None, behavior=enabledBehavior, settings=settings, recursionPolicy=recursionPolicy, concurrency=concurrency) - controller.run () - return dict (controller.stats) + c.run () + return dict (c.stats) -- cgit v1.2.3