fixed LogStats extension, which got broken after a wrong merge before the 0.16 release

This commit is contained in:
Pablo Hoffman 2012-10-25 15:24:53 -02:00
parent e8e5a62c20
commit b01be8619d
1 changed files with 1 additions and 8 deletions

View File

@ -21,7 +21,7 @@ class LogStats(object):
@classmethod
def from_crawler(cls, crawler):
interval = settings.getfloat('LOGSTATS_INTERVAL')
interval = crawler.settings.getfloat('LOGSTATS_INTERVAL')
if not interval:
raise NotConfigured
o = cls(interval)
@ -33,13 +33,6 @@ class LogStats(object):
crawler.signals.connect(o.engine_stopped, signal=signals.engine_stopped)
return o
@classmethod
def from_crawler(cls, crawler):
interval = crawler.settings.getfloat('LOGSTATS_INTERVAL')
if not interval:
raise NotConfigured
return cls(interval)
def item_scraped(self, spider):
self.slots[spider].items += 1