Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IPDSnelting
mjtest
Commits
1ba99601
Commit
1ba99601
authored
Nov 27, 2016
by
Johannes Bechberger
Browse files
Improve posix error code message
parent
7958822e
Changes
1
Hide whitespace changes
Inline
Side-by-side
mjtest/util/shell.py
View file @
1ba99601
...
...
@@ -4,6 +4,7 @@
Convenience function
Alternative to subprocess and os.system
"""
import
os
import
shlex
import
subprocess
has_resource_module
=
True
...
...
@@ -113,7 +114,7 @@ class _Execute(object):
self
.
returncode
=
128
-
self
.
returncode
if
self
.
returncode
in
_EXIT_CODES
:
_LOG
.
debug
(
"returncode %d recognized as '%s'"
%
(
self
.
returncode
,
_EXIT_CODES
[
self
.
returncode
]))
raise
SigKill
(
self
.
returncode
,
_EXIT_CODES
[
self
.
returncode
])
raise
SigKill
(
-
self
.
returncode
,
_EXIT_CODES
[
self
.
returncode
]
+
": "
+
os
.
strerror
(
-
self
.
returncode
)
)
return
(
self
.
out
,
self
.
err
,
self
.
returncode
)
def
execute
(
cmd
,
env
=
None
,
timeout
=
0
,
rlimit
=
None
,
propagate_sigint
=
True
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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