diff options
author | Georg Brandl <georg@python.org> | 2006-12-11 07:56:43 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-12-11 07:56:43 (GMT) |
commit | 9e2423ae8f6970ce95c6522e2efb8dedbbb96622 (patch) | |
tree | 9e2e3eea18db19816359d4532275960864971ae9 | |
parent | f877b25008e1d3e10d4957e620261d6e101c6fdd (diff) | |
download | cpython-9e2423ae8f6970ce95c6522e2efb8dedbbb96622.zip cpython-9e2423ae8f6970ce95c6522e2efb8dedbbb96622.tar.gz cpython-9e2423ae8f6970ce95c6522e2efb8dedbbb96622.tar.bz2 |
Move errno imports back to individual functions.
(backport from rev. 52996)
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -25,8 +25,6 @@ and opendir), and leave all pathname manipulation to os.path import sys -from errno import ENOENT, ENOTDIR, EEXIST - _names = sys.builtin_module_names # Note: more names are added to __all__ later. @@ -158,6 +156,7 @@ def makedirs(name, mode=0777): recursive. """ + from errno import EEXIST head, tail = path.split(name) if not tail: head, tail = path.split(head) @@ -366,6 +365,8 @@ def execvpe(file, args, env): __all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"]) def _execvpe(file, args, env=None): + from errno import ENOENT, ENOTDIR + if env is not None: func = execve argrest = (args, env) |