mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Move errno imports back to individual functions.
This commit is contained in:
parent
0adf0846ce
commit
f54a63b3b5
1 changed files with 3 additions and 2 deletions
|
@ -25,8 +25,6 @@ and opendir), and leave all pathname manipulation to os.path
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from errno import ENOENT, ENOTDIR, EEXIST
|
|
||||||
|
|
||||||
_names = sys.builtin_module_names
|
_names = sys.builtin_module_names
|
||||||
|
|
||||||
# Note: more names are added to __all__ later.
|
# Note: more names are added to __all__ later.
|
||||||
|
@ -158,6 +156,7 @@ def makedirs(name, mode=0777):
|
||||||
recursive.
|
recursive.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
from errno import EEXIST
|
||||||
head, tail = path.split(name)
|
head, tail = path.split(name)
|
||||||
if not tail:
|
if not tail:
|
||||||
head, tail = path.split(head)
|
head, tail = path.split(head)
|
||||||
|
@ -366,6 +365,8 @@ def execvpe(file, args, env):
|
||||||
__all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
|
__all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
|
||||||
|
|
||||||
def _execvpe(file, args, env=None):
|
def _execvpe(file, args, env=None):
|
||||||
|
from errno import ENOENT, ENOTDIR
|
||||||
|
|
||||||
if env is not None:
|
if env is not None:
|
||||||
func = execve
|
func = execve
|
||||||
argrest = (args, env)
|
argrest = (args, env)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue