1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-06 05:08:42 +02:00

- added new function core.run_external which can be used to execute an external program

Basically it's just a wrapper around subprocess.call which raises an ExtRuntimeError
exception if subprocess.call raised an OSError with errno set to ENOENT (unfortunately
the OSError's filename attribute is set to None therefore we cannot print a meaningful
error message (that's why an ExtRuntimeError is raised)).
Replaced all occurrences of subprocess.call with a corresponding run_external call.
This commit is contained in:
Marcus Huewe
2013-03-08 00:56:57 +01:00
parent ec595d361b
commit 93df866787
4 changed files with 48 additions and 28 deletions

View File

@@ -149,7 +149,7 @@ def run(prg):
print >>sys.stderr, e
return 2
except oscerr.ExtRuntimeError, e:
print >>sys.stderr, e.msg
print >>sys.stderr, e.file + ':', e.msg
return 1
except oscerr.WorkingCopyOutdated, e:
print >>sys.stderr, e