]> granicus.if.org Git - python/commitdiff
bpo-37359: Fix regrtest --cleanup (GH-14336)
authorVictor Stinner <vstinner@redhat.com>
Mon, 24 Jun 2019 11:19:48 +0000 (13:19 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2019 11:19:48 +0000 (13:19 +0200)
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)