summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-05-01 18:50:51 +0000
committerChris Lumens <clumens@redhat.com>2007-05-01 18:50:51 +0000
commit238f5aee10f0b6b4ea274e17c6352b223b1ce7aa (patch)
tree0098c819e010d7909274238327b107e82b11556b /iutil.py
parent68c8f5486c63f4b5626a9b7428d5ba0d54ac6563 (diff)
downloadanaconda-238f5aee10f0b6b4ea274e17c6352b223b1ce7aa.tar.gz
anaconda-238f5aee10f0b6b4ea274e17c6352b223b1ce7aa.tar.xz
anaconda-238f5aee10f0b6b4ea274e17c6352b223b1ce7aa.zip
Log the failing command as well as raising an exception, as some callers just
throw away the exception.
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index 04849a40c..0f7ea4a04 100644
--- a/iutil.py
+++ b/iutil.py
@@ -48,6 +48,7 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2,
stderr=stderr, preexec_fn=chroot, cwd=root)
ret = proc.wait()
except OSError, (errno, msg):
+ log.error ("Error running " + command + ": " + msg)
raise RuntimeError, "Error running " + command + ": " + msg
return ret
@@ -71,6 +72,7 @@ def execWithCapture(command, argv, stdin = 0, stderr = 2, root='/'):
stderr=subprocess.STDOUT,
preexec_fn=chroot, cwd=root)
except OSError, (errno, msg):
+ log.error ("Error running " + command + ": " + msg)
raise RuntimeError, "Error running " + command + ": " + msg
rc = pipe.stdout.read()