summaryrefslogtreecommitdiff
path: root/Lib/rexec.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-12 21:31:52 +0000
committerGuido van Rossum <guido@python.org>1996-12-12 21:31:52 +0000
commit71f76e1f74f57cbf720a50bc0a840fd5d0865f51 (patch)
tree11b8908cf222e9302ef573823ffd1f5617cfa1d6 /Lib/rexec.py
parent01fbf2eea13bd279c48abd114966152027ea1d9a (diff)
downloadcpython-71f76e1f74f57cbf720a50bc0a840fd5d0865f51.tar.gz
Make sure ok_builtin_modules, ok_dynamic_modules and
builtin_module_names are always tuples.
Diffstat (limited to 'Lib/rexec.py')
-rw-r--r--Lib/rexec.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index b1e212226b..89904dce34 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