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

(cherry picked from commit 9bbf4d7083)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
Miss Islington (bot) 2019-06-24 04:43:16 -07:00 committed by GitHub
parent 20ad3310d4
commit 5779898a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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)