Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d0dcbc4b
Commit
d0dcbc4b
authored
Jan 07, 2008
by
Facundo Batista
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of issue 1755179 fix.
parent
6e3e6e0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
Lib/os.py
Lib/os.py
+3
-6
No files found.
Lib/os.py
View file @
d0dcbc4b
...
...
@@ -23,7 +23,7 @@ and opendir), and leave all pathname manipulation to os.path
#'
import
sys
import
sys
,
errno
_names
=
sys
.
builtin_module_names
...
...
@@ -156,7 +156,6 @@ def makedirs(name, mode=0777):
recursive.
"""
from
errno
import
EEXIST
head
,
tail
=
path
.
split
(
name
)
if
not
tail
:
head
,
tail
=
path
.
split
(
head
)
...
...
@@ -165,7 +164,7 @@ def makedirs(name, mode=0777):
makedirs
(
head
,
mode
)
except
OSError
,
e
:
# be happy if someone already created the path
if
e
.
errno
!=
EEXIST
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
if
tail
==
curdir
:
# xxx/newdir/. exists if xxx/newdir exists
return
...
...
@@ -365,8 +364,6 @@ 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
)
...
...
@@ -392,7 +389,7 @@ def _execvpe(file, args, env=None):
func
(
fullname
,
*
argrest
)
except
error
,
e
:
tb
=
sys
.
exc_info
()[
2
]
if
(
e
.
errno
!=
ENOENT
and
e
.
errno
!=
ENOTDIR
if
(
e
.
errno
!=
errno
.
ENOENT
and
e
.
errno
!=
errno
.
ENOTDIR
and
saved_exc
is
None
):
saved_exc
=
e
saved_tb
=
tb
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment