mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-41043: Escape literal part of the path for glob(). (GH-20994)
This commit is contained in:
parent
a041e116db
commit
9355868458
24 changed files with 37 additions and 31 deletions
|
|
@ -602,7 +602,7 @@ class Regrtest:
|
|||
def cleanup(self):
|
||||
import glob
|
||||
|
||||
path = os.path.join(self.tmp_dir, 'test_python_*')
|
||||
path = os.path.join(glob.escape(self.tmp_dir), 'test_python_*')
|
||||
print("Cleanup %s directory" % self.tmp_dir)
|
||||
for name in glob.glob(path):
|
||||
if os.path.isdir(name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue