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:
@@ -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
|
||||
|
Reference in New Issue
Block a user