diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
| commit | 8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8 (patch) | |
| tree | 598923b2b554aeaf77457a83c399c616a7ecc162 /share/extensions/run_command.py | |
| parent | Remove unnecesatry text parameter (diff) | |
| parent | fix nodes reverting back during editing (diff) | |
| download | inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.tar.gz inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.zip | |
Add fixes sugested by Martin Owens
(bzr r15392.1.7)
Diffstat (limited to 'share/extensions/run_command.py')
| -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)) |
