1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-23 21:24:20 +00:00

Use ignore_errors option from rmtree

This commit is contained in:
Daniel Graña 2018-08-15 11:59:09 -03:00
parent 4eaf8690b1
commit 38608bc249

View File

@ -244,13 +244,7 @@ class FeedExportTest(unittest.TestCase):
content = f.read()
finally:
# FIXME: Windows fails to remove the file because FeedExporter
# keeps a reference to the temporal file even after
# the spider finished.
try:
shutil.rmtree(tmpdir)
except OSError:
pass
shutil.rmtree(tmpdir, ignore_errors=True)
defer.returnValue(content)