--- iutil.py | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/iutil.py b/iutil.py index ba1d0b4..1e90025 100644 --- a/iutil.py +++ b/iutil.py @@ -87,23 +87,13 @@ def execWithRedirect(command, argv, stdin = None, stdout = None, try: proc = subprocess.Popen([command] + argv, stdin=stdin, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stdout=stdout, + stderr=stderr, preexec_fn=chroot, cwd=root, env=env) + proc.wait() + ret = proc.returncode - while True: - (outStr, errStr) = proc.communicate() - if outStr: - os.write(stdout, outStr) - runningLog.write(outStr) - if errStr: - os.write(stderr, errStr) - runningLog.write(errStr) - - if proc.returncode is not None: - ret = proc.returncode - break except OSError as e: errstr = "Error running %s: %s" % (command, e.strerror) log.error(errstr) -- 1.5.4.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list