summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-03-28 12:54:17 -0400
committerChris Lumens <clumens@redhat.com>2008-03-28 12:54:58 -0400
commita39f8937968c5a3e030807dc4827bb4fb5dad136 (patch)
tree9a596dfb795a8ca866fa250b3c8d4b053b93d5e2 /iutil.py
parentd504f0b11ac13ddd9dc4e60ca02b24d086b1cf4d (diff)
downloadanaconda-a39f8937968c5a3e030807dc4827bb4fb5dad136.tar.gz
anaconda-a39f8937968c5a3e030807dc4827bb4fb5dad136.tar.xz
anaconda-a39f8937968c5a3e030807dc4827bb4fb5dad136.zip
Make sure there's a stdout to write to.
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/iutil.py b/iutil.py
index 56f61e15e..0ef898cf0 100644
--- a/iutil.py
+++ b/iutil.py
@@ -59,7 +59,9 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2,
if type(stderr) == type("string"):
stderr = open(stderr, "w")
- stdout.write("Running... %s\n" %([command] + argv,))
+ if stdout is not None:
+ stdout.write("Running... %s\n" %([command] + argv,))
+
try:
proc = subprocess.Popen([command] + argv, stdin=stdin, stdout=stdout,
stderr=stderr, preexec_fn=chroot, cwd=root)