diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-01-15 02:09:19 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-01-15 02:09:19 +0000 |
| commit | c4058f9f1ccd9c3bb2eecbb781cc1fee7001a9ac (patch) | |
| tree | 642b8616eaa6e9b53a7ced864db86661cee81aa0 | |
| parent | [Bug #1654892] Few typos in Calligraphy tutorial. (diff) | |
| download | inkscape-c4058f9f1ccd9c3bb2eecbb781cc1fee7001a9ac.tar.gz inkscape-c4058f9f1ccd9c3bb2eecbb781cc1fee7001a9ac.zip | |
Extensions: run_command.py - inform user about output to stderr even if error code is zero
(bzr r15417)
| -rwxr-xr-x | share/extensions/run_command.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/share/extensions/run_command.py b/share/extensions/run_command.py index 7012c4274..950e9ed7c 100755 --- a/share/extensions/run_command.py +++ b/share/extensions/run_command.py @@ -61,8 +61,11 @@ def run(command_format, prog_name): except ImportError: # shouldn't happen... msg = "Neither subprocess.Popen nor popen2.Popen3 is available" - if rc and msg is None: - msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + if msg is None: + if rc: + msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + elif err: + sys.stderr.write("%s executed but logged the following error:\n%s\n%s\n" % (prog_name, out, err)) except Exception, inst: msg = "Error attempting to run %s: %s" % (prog_name, str(inst)) |
