mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-107963: Fix set_forkserver_preload to check the type of given list (#107965)
gh-107963: Fix set_forkserver_preload to check the type of given list
This commit is contained in:
parent
d66bc9e8a7
commit
6515ec3d3d
3 changed files with 11 additions and 1 deletions
|
@ -61,7 +61,7 @@ class ForkServer(object):
|
|||
|
||||
def set_forkserver_preload(self, modules_names):
|
||||
'''Set list of module names to try to load in forkserver process.'''
|
||||
if not all(type(mod) is str for mod in self._preload_modules):
|
||||
if not all(type(mod) is str for mod in modules_names):
|
||||
raise TypeError('module_names must be a list of strings')
|
||||
self._preload_modules = modules_names
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue