Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
57794609
Commit
57794609
authored
Jan 17, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch OSError from 'spawnv()' in '_spawn_nt()'.
Tweaked error messages in '_spawn_posix()'.
parent
ab853dd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
spawn.py
spawn.py
+12
-5
No files found.
spawn.py
View file @
57794609
...
@@ -63,9 +63,16 @@ def _spawn_nt ( cmd,
...
@@ -63,9 +63,16 @@ def _spawn_nt ( cmd,
print
string
.
join
(
[
executable
]
+
cmd
[
1
:],
' '
)
print
string
.
join
(
[
executable
]
+
cmd
[
1
:],
' '
)
if
not
dry_run
:
if
not
dry_run
:
# spawn for NT requires a full path to the .exe
# spawn for NT requires a full path to the .exe
try
:
rc
=
os
.
spawnv
(
os
.
P_WAIT
,
executable
,
cmd
)
rc
=
os
.
spawnv
(
os
.
P_WAIT
,
executable
,
cmd
)
except
OSError
,
exc
:
# this seems to happen when the command isn't found
raise
DistutilsExecError
,
\
"command '%s' failed: %s"
%
(
cmd
[
0
],
exc
[
-
1
])
if
rc
!=
0
:
if
rc
!=
0
:
raise
DistutilsExecError
(
"command failed: %d"
%
rc
)
# and this reflects the command running but failing
raise
DistutilsExecError
,
\
"command '%s' failed with exit status %d"
%
(
cmd
[
0
],
rc
)
...
@@ -103,7 +110,7 @@ def _spawn_posix (cmd,
...
@@ -103,7 +110,7 @@ def _spawn_posix (cmd,
(
pid
,
status
)
=
os
.
waitpid
(
pid
,
0
)
(
pid
,
status
)
=
os
.
waitpid
(
pid
,
0
)
if
os
.
WIFSIGNALED
(
status
):
if
os
.
WIFSIGNALED
(
status
):
raise
DistutilsExecError
,
\
raise
DistutilsExecError
,
\
"command
%s
terminated by signal %d"
%
\
"command
'%s'
terminated by signal %d"
%
\
(
cmd
[
0
],
os
.
WTERMSIG
(
status
))
(
cmd
[
0
],
os
.
WTERMSIG
(
status
))
elif
os
.
WIFEXITED
(
status
):
elif
os
.
WIFEXITED
(
status
):
...
@@ -112,7 +119,7 @@ def _spawn_posix (cmd,
...
@@ -112,7 +119,7 @@ def _spawn_posix (cmd,
return
# hey, it succeeded!
return
# hey, it succeeded!
else
:
else
:
raise
DistutilsExecError
,
\
raise
DistutilsExecError
,
\
"command
%s
failed with exit status %d"
%
\
"command
'%s'
failed with exit status %d"
%
\
(
cmd
[
0
],
exit_status
)
(
cmd
[
0
],
exit_status
)
elif
os
.
WIFSTOPPED
(
status
):
elif
os
.
WIFSTOPPED
(
status
):
...
@@ -120,6 +127,6 @@ def _spawn_posix (cmd,
...
@@ -120,6 +127,6 @@ def _spawn_posix (cmd,
else
:
else
:
raise
DistutilsExecError
,
\
raise
DistutilsExecError
,
\
"unknown error executing
%s
: termination status %d"
%
\
"unknown error executing
'%s'
: termination status %d"
%
\
(
cmd
[
0
],
status
)
(
cmd
[
0
],
status
)
# _spawn_posix ()
# _spawn_posix ()
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