]> granicus.if.org Git - python/commitdiff
Fixed #8375 - test_distutils now checks what remains to be cleaned up during tearDown
authorTarek Ziadé <ziade.tarek@gmail.com>
Mon, 12 Apr 2010 08:23:49 +0000 (08:23 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Mon, 12 Apr 2010 08:23:49 +0000 (08:23 +0000)
Lib/distutils/tests/support.py
Misc/NEWS

index d60da854be919b2fc68b24f57c13e4911e41b202..45c94411eee791db052a07aa019d656186e63217 100644 (file)
@@ -63,6 +63,8 @@ class TempdirManager(object):
         super().tearDown()
         while self.tempdirs:
             d = self.tempdirs.pop()
+            if not os.path.exists(d):
+                continue
             shutil.rmtree(d, os.name in ('nt', 'cygwin'))
 
     def mkdtemp(self):
index 7d5fefe29c416d8fbe04f6963d5880273bf21ae3..0ca4bd3194b7823545d26390cd3be83e17213698 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -312,6 +312,9 @@ C-API
 Library
 -------
 
+- Issue #8375: test_distutils now checks if the temporary directory are still
+  present before it cleans them.
+
 - Issue #8374: Update the internal alias table in the :mod:`locale` module
   to cover recent locale changes and additions.