summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-06-10 14:13:35 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-06-11 14:40:29 +0200
commite8e88ed2084faeba7858f54c310e333b60513ed5 (patch)
tree2885eff148207d3915d0efb4fe6f9f6d5598c39d
parentf8de527d83245819cbfd34d86af2a93432561077 (diff)
downloadfreeipa-e8e88ed2084faeba7858f54c310e333b60513ed5.zip
freeipa-e8e88ed2084faeba7858f54c310e333b60513ed5.tar.gz
freeipa-e8e88ed2084faeba7858f54c310e333b60513ed5.tar.xz
Flush stream after writing service messages
sys.stdout is buffered by default if redirected to a file. This may causes automated installation to appear hung. Flush the stream so that messages are written immediately.
-rw-r--r--ipaserver/install/service.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py
index f3cd189..4a244ab 100644
--- a/ipaserver/install/service.py
+++ b/ipaserver/install/service.py
@@ -55,6 +55,7 @@ def print_msg(message, output_fd=sys.stdout):
root_logger.debug(message)
output_fd.write(message)
output_fd.write("\n")
+ output_fd.flush()
class Service(object):