Check return value of the given command of shelltools.system, raise exception if it is not equal to zero. This also effects methods using system, like domo, dobin, doman etc.

This commit is contained in:
Gökçen Eraslan
2009-01-04 10:43:14 +00:00
parent 779760f1af
commit 00c143ce34
+7 -1
View File
@@ -242,4 +242,10 @@ def dirName(filePath):
def system(command):
command = string.join(string.split(command))
return run_logged(command)
retValue = run_logged(command)
#if return value is different than 0, it means error, raise exception
if retValue != 0:
error(_("Command \"%s\" failed, return value was %d." % (command, retValue)))
return retValue