diff --git a/utils/ansible-ipa-client-install b/utils/ansible-ipa-client-install index de78b32d9d84c903ae75a98a9bb694aaf5c6a760..453b75f30d3e3a00260f85f45bbf6e7c44ae145d 100755 --- a/utils/ansible-ipa-client-install +++ b/utils/ansible-ipa-client-install @@ -227,9 +227,11 @@ def run_cmd(args): p = subprocess.Popen(args, stdout=p_out, stderr=p_err, close_fds=True, bufsize=1, universal_newlines=True) - with p.stdout: - for line in p.stdout: - sys.stdout.write(line) + while True: + line = p.stdout.readline() + if p.poll() is not None and line == "": + break + sys.stdout.write(line) except KeyboardInterrupt: p.wait() raise diff --git a/utils/ansible-ipa-replica-install b/utils/ansible-ipa-replica-install index 1d1312531ad68ce2b1cf86a90bb3e40810e67d0c..54c85bb49ba3d8541addf3aefc231aef29cf8280 100755 --- a/utils/ansible-ipa-replica-install +++ b/utils/ansible-ipa-replica-install @@ -295,9 +295,11 @@ def run_cmd(args): p = subprocess.Popen(args, stdout=p_out, stderr=p_err, close_fds=True, bufsize=1, universal_newlines=True) - with p.stdout: - for line in p.stdout: - sys.stdout.write(line) + while True: + line = p.stdout.readline() + if p.poll() is not None and line == "": + break + sys.stdout.write(line) except KeyboardInterrupt: p.wait() raise diff --git a/utils/ansible-ipa-server-install b/utils/ansible-ipa-server-install index e1ab3d4ddbd45409efe643af2b7b242d0ea12bbb..9e2ea48675dcbbaa1972c2fd28879f4bd59b00ec 100755 --- a/utils/ansible-ipa-server-install +++ b/utils/ansible-ipa-server-install @@ -331,9 +331,11 @@ def run_cmd(args): p = subprocess.Popen(args, stdout=p_out, stderr=p_err, close_fds=True, bufsize=1, universal_newlines=True) - with p.stdout: - for line in p.stdout: - sys.stdout.write(line) + while True: + line = p.stdout.readline() + if p.poll() is not None and line == "": + break + sys.stdout.write(line) except KeyboardInterrupt: p.wait() raise