summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-16 19:49:20 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-16 19:49:20 (GMT)
commite5e7a7cbf450f80fa9a88038878b6bd525313f37 (patch)
tree02534825505cbbe06aa12dfda5386330a0d67605 /Lib/test/test_importlib
parente3eb0615af1389f221cb617de71fe9bb42bb7769 (diff)
parentc28f6fa505f717698038b41492265129c77dfc0e (diff)
downloadcpython-e5e7a7cbf450f80fa9a88038878b6bd525313f37.zip
cpython-e5e7a7cbf450f80fa9a88038878b6bd525313f37.tar.gz
cpython-e5e7a7cbf450f80fa9a88038878b6bd525313f37.tar.bz2
#11420: merge with 3.2.
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/source/test_file_loader.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/source/test_file_loader.py b/Lib/test/test_importlib/source/test_file_loader.py
index 90f9d30..d59969a 100644
--- a/Lib/test/test_importlib/source/test_file_loader.py
+++ b/Lib/test/test_importlib/source/test_file_loader.py
@@ -159,7 +159,8 @@ class SimpleTest(unittest.TestCase):
finally:
os.unlink(file_path)
pycache = os.path.dirname(imp.cache_from_source(file_path))
- shutil.rmtree(pycache)
+ if os.path.exists(pycache):
+ shutil.rmtree(pycache)
def test_timestamp_overflow(self):
# When a modification timestamp is larger than 2**32, it should be