call Spider.closed() method (if it exists) on SpiderManager.close_spider()

This commit is contained in:
Pablo Hoffman 2010-08-27 18:36:00 -03:00
parent 35fd1a2660
commit 0ae4c3aa82
1 changed files with 3 additions and 1 deletions

View File

@ -66,4 +66,6 @@ class SpiderManager(object):
return self._spiders.keys()
def close_spider(self, spider, reason):
pass
closed = getattr(spider, 'closed', None)
if callable(closed):
return closed(reason)