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

This commit is contained in:
Victor Stinner 2019-06-24 13:19:48 +02:00 committed by GitHub
parent a8b27e623d
commit 9bbf4d7083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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