Scrapy, a fast high-level web crawling & scraping framework for Python.
periodic_log: interval check moved
Georgiy Zatserklianyif05657e54245
diff --git a/scrapy/extensions/periodic_log.py b/scrapy/extensions/periodic_log.pyindex 1023b3cd5..214f55777 100644--- a/scrapy/extensions/periodic_log.py+++ b/scrapy/extensions/periodic_log.py@@ -37,6 +37,8 @@ class PeriodicLog:@classmethoddef from_crawler(cls, crawler):interval = crawler.settings.getfloat("LOGSTATS_INTERVAL")+ if not interval:+ raise NotConfiguredtry:ext_stats = crawler.settings.getdict("PERIODIC_LOG_STATS")except (TypeError, ValueError):@@ -57,8 +59,6 @@ class PeriodicLog:ext_timing_enabled = crawler.settings.getbool("PERIODIC_LOG_TIMING_ENABLED", False)- if not interval:- raise NotConfiguredif not (ext_stats or ext_delta or ext_timing_enabled):raise NotConfiguredo = cls(