summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-06-20 08:10:31 (GMT)
committerGitHub <noreply@github.com>2020-06-20 08:10:31 (GMT)
commit935586845815f5b4c7814794413f6a812d4bd45f (patch)
tree69297d0f173d3b42895adb1da65c99f1e021b586 /Lib/test/test_import
parenta041e116db5f1e78222cbf2c22aae96457372680 (diff)
downloadcpython-935586845815f5b4c7814794413f6a812d4bd45f.zip
cpython-935586845815f5b4c7814794413f6a812d4bd45f.tar.gz
cpython-935586845815f5b4c7814794413f6a812d4bd45f.tar.bz2
bpo-41043: Escape literal part of the path for glob(). (GH-20994)
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r--Lib/test/test_import/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 060d145..a04cf65 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -486,7 +486,7 @@ class ImportTests(unittest.TestCase):
pyexe = os.path.join(tmp, os.path.basename(sys.executable))
shutil.copy(sys.executable, pyexe)
shutil.copy(dllname, tmp)
- for f in glob.glob(os.path.join(sys.prefix, "vcruntime*.dll")):
+ for f in glob.glob(os.path.join(glob.escape(sys.prefix), "vcruntime*.dll")):
shutil.copy(f, tmp)
shutil.copy(pydname, tmp2)