summaryrefslogtreecommitdiff
path: root/crocoite/task.py
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-06-21 11:49:25 +0200
committerLars-Dominik Braun <lars@6xq.net>2018-06-21 11:49:25 +0200
commitd19c692ad2f0a00beb4d892d2a165bdd270b1446 (patch)
treeb2f5de90fbadb0f60751c7048254b49853ff2893 /crocoite/task.py
parent6c58093eefec13044c836a97a2dacdee162836db (diff)
downloadcrocoite-d19c692ad2f0a00beb4d892d2a165bdd270b1446.tar.gz
crocoite-d19c692ad2f0a00beb4d892d2a165bdd270b1446.tar.bz2
crocoite-d19c692ad2f0a00beb4d892d2a165bdd270b1446.zip
Fix a few issues pointed out by pylint
Diffstat (limited to 'crocoite/task.py')
-rw-r--r--crocoite/task.py12
1 files changed, 6 insertions, 6 deletions
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)