summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-12 21:31:52 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-12 21:31:52 (GMT)
commit32616fbee67d00e12d5ede7a9e762e6635eb45fe (patch)
treead062a04c04c2a577ff46c5918bb671e23394232
parent15d1079dd226002a4360e36ef592e66930154411 (diff)
downloadcpython-32616fbee67d00e12d5ede7a9e762e6635eb45fe.zip
cpython-32616fbee67d00e12d5ede7a9e762e6635eb45fe.tar.gz
cpython-32616fbee67d00e12d5ede7a9e762e6635eb45fe.tar.bz2
Make sure ok_builtin_modules, ok_dynamic_modules and
builtin_module_names are always tuples.
-rw-r--r--Lib/rexec.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index b1e2122..89904dc 100644
--- a/Lib/rexec.py
+++ b/Lib/rexec.py
@@ -157,7 +157,7 @@ class RExec(ihooks._Verbose):
for mname in self.ok_builtin_modules:
if mname in sys.builtin_module_names:
list.append(mname)
- self.ok_builtin_modules = list
+ self.ok_builtin_modules = tuple(list)
self.set_trusted_path()
self.make_builtin()
self.make_initial_modules()
@@ -217,9 +217,9 @@ class RExec(ihooks._Verbose):
m.argv = ['RESTRICTED']
m.path = map(None, self.ok_path)
m = self.modules['sys']
- m.builtin_module_names = \
- self.modules.keys() + self.ok_builtin_modules
- m.builtin_module_names.sort()
+ l = self.modules.keys() + list(self.ok_builtin_modules)
+ l.sort()
+ m.builtin_module_names = tuple(l)
# The copy_* methods copy existing modules with some changes