Commit 34e96b1d authored by Kirill Smelkov's avatar Kirill Smelkov

Include spawned command into stderr if Popen fails

Instead of just traceback saying that e.g. "No such command" without
information which command it was tried to spawn, stderr will now include
what was tried to be run. This makes diagnostic easier.
parent fd18ad7d
......@@ -174,7 +174,8 @@ def main():
env.update(envadj)
p = Popen(t.argv, env=env, stdin=devnull, stdout=PIPE, stderr=PIPE, bufsize=1, **kw)
except:
stdout, stderr = '', traceback.format_exc()
stdout = ''
stderr = 'run %r\n%s' % (t.argv, traceback.format_exc())
sys.stderr.write(stderr)
status['error_count'] += 1
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment