From 38608bc2495189bd7de2dc48c0036df217138377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Wed, 15 Aug 2018 11:59:09 -0300 Subject: [PATCH] Use ignore_errors option from rmtree --- tests/test_feedexport.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/test_feedexport.py b/tests/test_feedexport.py index 76452d450..e46c8c14e 100644 --- a/tests/test_feedexport.py +++ b/tests/test_feedexport.py @@ -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)