bugfix in scraping report

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40137
This commit is contained in:
elpolilla 2008-07-30 11:20:22 +00:00
parent 7b0877c50e
commit c76200561d
1 changed files with 6 additions and 4 deletions

View File

@ -57,8 +57,10 @@ class Report(object):
def engine_stopped(self):
if self.passed:
self.passed_file.write('\n--- Total scraped products: %d\n' % self.total['passed'])
self.passed_file.close()
if self.passed_file:
self.passed_file.write('\n--- Total scraped products: %d\n' % self.total['passed'])
self.passed_file.close()
if self.dropped:
self.dropped_file.write('\n--- Total dropped products: %d\n' % self.total['dropped'])
self.dropped_file.close()
if self.dropped_file:
self.dropped_file.write('\n--- Total dropped products: %d\n' % self.total['dropped'])
self.dropped_file.close()