diff options
author | Chris Lumens <clumens@redhat.com> | 2009-03-09 14:25:53 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-03-09 16:42:56 -0400 |
commit | b8e2d97b81fe264fc20f2337e68c9197066950de (patch) | |
tree | eacc4ac5df2557b2bb4c28a66c878e706dd5de0a /iutil.py | |
parent | 9b23fb1cd22f6f2cc4f6b18897e65ab1e4d68328 (diff) | |
download | anaconda-b8e2d97b81fe264fc20f2337e68c9197066950de.tar.gz anaconda-b8e2d97b81fe264fc20f2337e68c9197066950de.tar.xz anaconda-b8e2d97b81fe264fc20f2337e68c9197066950de.zip |
stdout and stderr may also need to be created.
This is required when handling kickstart scriptlets that can write to
log files, since the log file will need to be created before it can
be opened.
Diffstat (limited to 'iutil.py')
-rw-r--r-- | iutil.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -65,14 +65,14 @@ def execWithRedirect(command, argv, stdin = None, stdout = None, stdin = sys.stdin.fileno() if isinstance(stdout, str): - stdout = os.open(stdout, os.O_RDWR) + stdout = os.open(stdout, os.O_RDWR|os.O_CREAT) elif isinstance(stdout, int): pass elif stdout is None or not isinstance(stdout, file): stdout = sys.stdout.fileno() if isinstance(stderr, str): - stderr = os.open(stderr, os.O_RDWR) + stderr = os.open(stderr, os.O_RDWR|os.O_CREAT) elif isinstance(stderr, int): pass elif stderr is None or not isinstance(stderr, file): @@ -135,7 +135,7 @@ def execWithCapture(command, argv, stdin = None, stderr = None, root='/'): stdin = sys.stdin.fileno() if isinstance(stderr, str): - stderr = os.open(stderr, os.O_RDWR) + stderr = os.open(stderr, os.O_RDWR|os.O_CREAT) elif isinstance(stderr, int): pass elif stderr is None or not isinstance(stderr, file): @@ -184,14 +184,14 @@ def execWithPulseProgress(command, argv, stdin = None, stdout = None, stdin = sys.stdin.fileno() if isinstance(stdout, str): - stdout = os.open(stdout, os.O_RDWR) + stdout = os.open(stdout, os.O_RDWR|os.O_CREAT) elif isinstance(stdout, int): pass elif stdout is None or not isinstance(stdout, file): stdout = sys.stdout.fileno() if isinstance(stderr, str): - stderr = os.open(stderr, os.O_RDWR) + stderr = os.open(stderr, os.O_RDWR|os.O_CREAT) elif isinstance(stderr, int): pass elif stderr is None or not isinstance(stderr, file): |