[Python-checkins] bpo-37359: Fix regrtest --cleanup (GH-14336)

Miss Islington (bot) webhook-mailer at python.org
Mon Jun 24 07:37:59 EDT 2019


https://github.com/python/cpython/commit/366dac99c0c0c416a37874140696f59178db4e43
commit: 366dac99c0c0c416a37874140696f59178db4e43
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-24T04:37:55-07:00
summary:

bpo-37359: Fix regrtest --cleanup (GH-14336)

(cherry picked from commit 9bbf4d7083a819cbcee2a6cd3df2802d4c50f734)

Co-authored-by: Victor Stinner <vstinner at redhat.com>

files:
M Lib/test/libregrtest/main.py

diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 98b4420f590e..1dfbe47a2fab 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -592,8 +592,8 @@ def cleanup(self):
         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)



More information about the Python-checkins mailing list