summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-10-19 01:31:08 -0500
committerMichael E Brown <mebrown@michaels-house.net>2007-10-19 01:31:08 -0500
commitdf74993d060f558c849f8feb62def958bc192eba (patch)
tree89f0a62844b0a4f5f5881d00613150f4e116e591 /src
parent6abafa46c0452e4d1d3c6ea9d9e6ddb5495a20b3 (diff)
downloadmock-df74993d060f558c849f8feb62def958bc192eba.tar.gz
mock-df74993d060f558c849f8feb62def958bc192eba.tar.xz
mock-df74993d060f558c849f8feb62def958bc192eba.zip
better message for failed command when output disabled.
Diffstat (limited to 'src')
-rw-r--r--src/py-libs/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/py-libs/util.py b/src/py-libs/util.py
index f2d13f6..f4f189b 100644
--- a/src/py-libs/util.py
+++ b/src/py-libs/util.py
@@ -223,7 +223,10 @@ def do(command, chrootPath=None, timeout=0, raiseExc=True, returnOutput=0, *args
# mask and return just return value, plus child output
if raiseExc and os.WEXITSTATUS(ret):
- raise mock.exception.Error, "Command(%s) failed. Output: %s" % (command, output)
+ if returnOutput:
+ raise mock.exception.Error, "Command(%s) failed. Output: %s" % (command, output)
+ else:
+ raise mock.exception.Error, "Command(%s) failed. See logs for output." % command
return output