diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-07-02 07:05:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 07:05:16 (GMT) |
commit | ecfecc2d6ce88ae71c783f0465a508c6a1b2f2b6 (patch) | |
tree | 15fe925d7c2eed5f56154f68971a5883870d5841 /Lib/test/test_import/__init__.py | |
parent | df59293bf0d815fe37743025d639a63a78e0c771 (diff) | |
download | cpython-ecfecc2d6ce88ae71c783f0465a508c6a1b2f2b6.zip cpython-ecfecc2d6ce88ae71c783f0465a508c6a1b2f2b6.tar.gz cpython-ecfecc2d6ce88ae71c783f0465a508c6a1b2f2b6.tar.bz2 |
[3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275)
(cherry picked from commit 935586845815f5b4c7814794413f6a812d4bd45f)
Diffstat (limited to 'Lib/test/test_import/__init__.py')
-rw-r--r-- | Lib/test/test_import/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index d50befc..d1dafbe 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -485,7 +485,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) |