Commit 32616fbe authored by Guido van Rossum's avatar Guido van Rossum

Make sure ok_builtin_modules, ok_dynamic_modules and

builtin_module_names are always tuples.
parent 15d1079d
...@@ -157,7 +157,7 @@ class RExec(ihooks._Verbose): ...@@ -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): ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment