diff options
author | Chris Lumens <clumens@redhat.com> | 2008-03-28 12:54:17 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-03-28 12:54:58 -0400 |
commit | a39f8937968c5a3e030807dc4827bb4fb5dad136 (patch) | |
tree | 9a596dfb795a8ca866fa250b3c8d4b053b93d5e2 /iutil.py | |
parent | d504f0b11ac13ddd9dc4e60ca02b24d086b1cf4d (diff) | |
download | anaconda-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.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |