diff options
Diffstat (limited to 'Lib/rexec.py')
-rw-r--r-- | Lib/rexec.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py index cc908a3..6f24433 100644 --- a/Lib/rexec.py +++ b/Lib/rexec.py @@ -59,7 +59,9 @@ copydict(posix.environ, safe_posix.environ) safe_types = new_module('types') copymodule(types, safe_types) -def safe_import(name): +def safe_import(name, globals=None, locals=None, fromlist=None): + if '.' in name: + raise ImportError, "import of dotted names not supported" if safe_sys.modules.has_key(name): return safe_sys.modules[name] if name in safe_modules: |