From: Victor Stinner Date: Mon, 24 Jun 2019 11:19:48 +0000 (+0200) Subject: bpo-37359: Fix regrtest --cleanup (GH-14336) X-Git-Tag: v3.9.0a1~1189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bbf4d7083a819cbcee2a6cd3df2802d4c50f734;p=thirdparty%2FPython%2Fcpython.git bpo-37359: Fix regrtest --cleanup (GH-14336) --- 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 @@ 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)