diff options
author | Chris Lumens <clumens@redhat.com> | 2007-05-01 18:50:51 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-05-01 18:50:51 +0000 |
commit | 238f5aee10f0b6b4ea274e17c6352b223b1ce7aa (patch) | |
tree | 0098c819e010d7909274238327b107e82b11556b /iutil.py | |
parent | 68c8f5486c63f4b5626a9b7428d5ba0d54ac6563 (diff) | |
download | anaconda-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.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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() |