summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-19 16:16:51 +0000
committerMatt Wilson <msw@redhat.com>1999-09-19 16:16:51 +0000
commit3c272a2fbb4e7df73f2807e0e5028a7e29b1c407 (patch)
tree6aa97fce33c70ad1b35f4df6d96fc84f41596da8 /iutil.py
parent47d60238152e3e5992c689b9039ace121d6f8742 (diff)
downloadanaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.tar.gz
anaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.tar.xz
anaconda-3c272a2fbb4e7df73f2807e0e5028a7e29b1c407.zip
execWithRedirect() takes filenames for stdin, etc
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index e95aa0b42..d97fe5e60 100644
--- a/iutil.py
+++ b/iutil.py
@@ -36,6 +36,13 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2,
if (not childpid):
if (root != '/'): isys.chroot (root)
+ if type(stdin) == type("a"):
+ stdin == os.open(stdin, os.O_RDONLY)
+ if type(stdout) == type("a"):
+ stdout == os.open(stdout, os.O_RDWR)
+ if type(stderr) == type("a"):
+ stderr = os.open(stderr, os.O_RDWR)
+
if stdin != 0:
os.dup2(stdin, 0)
os.close(stdin)