mirror of https://github.com/python/cpython
Make sure ok_builtin_modules, ok_dynamic_modules and
builtin_module_names are always tuples.
This commit is contained in:
parent
15d1079dd2
commit
32616fbee6
|
@ -157,7 +157,7 @@ class RExec(ihooks._Verbose):
|
||||||
for mname in self.ok_builtin_modules:
|
for mname in self.ok_builtin_modules:
|
||||||
if mname in sys.builtin_module_names:
|
if mname in sys.builtin_module_names:
|
||||||
list.append(mname)
|
list.append(mname)
|
||||||
self.ok_builtin_modules = list
|
self.ok_builtin_modules = tuple(list)
|
||||||
self.set_trusted_path()
|
self.set_trusted_path()
|
||||||
self.make_builtin()
|
self.make_builtin()
|
||||||
self.make_initial_modules()
|
self.make_initial_modules()
|
||||||
|
@ -217,9 +217,9 @@ class RExec(ihooks._Verbose):
|
||||||
m.argv = ['RESTRICTED']
|
m.argv = ['RESTRICTED']
|
||||||
m.path = map(None, self.ok_path)
|
m.path = map(None, self.ok_path)
|
||||||
m = self.modules['sys']
|
m = self.modules['sys']
|
||||||
m.builtin_module_names = \
|
l = self.modules.keys() + list(self.ok_builtin_modules)
|
||||||
self.modules.keys() + self.ok_builtin_modules
|
l.sort()
|
||||||
m.builtin_module_names.sort()
|
m.builtin_module_names = tuple(l)
|
||||||
|
|
||||||
# The copy_* methods copy existing modules with some changes
|
# The copy_* methods copy existing modules with some changes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue