]> granicus.if.org Git - python/commitdiff
bpo-37359: Fix regrtest --cleanup (GH-14336)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 24 Jun 2019 11:37:55 +0000 (04:37 -0700)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2019 11:37:55 +0000 (04:37 -0700)
(cherry picked from commit 9bbf4d7083a819cbcee2a6cd3df2802d4c50f734)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/libregrtest/main.py

index 98b4420f590e228baae61a6d143a7ef50f9b6309..1dfbe47a2fab5e40919e27959b512bcb9c4d5855 100644 (file)
@@ -592,8 +592,8 @@ class Regrtest:
         path = os.path.join(self.tmp_dir, 'test_python_*')
         print("Cleanup %s directory" % self.tmp_dir)
         for name in glob.glob(path):
-            print("Remove directory: %s" % name)
             if os.path.isdir(name):
+                print("Remove directory: %s" % name)
                 support.rmtree(name)
             else:
                 print("Remove file: %s" % name)