summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
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_multiprocessing.py
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_multiprocessing.py')
-rw-r--r--Lib/test/_test_multiprocessing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 444e234..5f65d96 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -4260,7 +4260,7 @@ class _TestImportStar(unittest.TestCase):
def get_module_names(self):
import glob
folder = os.path.dirname(multiprocessing.__file__)
- pattern = os.path.join(folder, '*.py')
+ pattern = os.path.join(glob.escape(folder), '*.py')
files = glob.glob(pattern)
modules = [os.path.splitext(os.path.split(f)[1])[0] for f in files]
modules = ['multiprocessing.' + m for m in modules]