mercurial/util.py
branchstable
changeset 13439 d724a69309e0
parent 13400 14f3795a5ed7
child 13734 16118b4859a1
--- a/mercurial/util.py	Fri Feb 18 03:34:47 2011 +0100
+++ b/mercurial/util.py	Fri Feb 18 03:35:01 2011 +0100
@@ -386,6 +386,10 @@
 
     if out is specified, it is assumed to be a file-like object that has a
     write() method. stdout and stderr will be redirected to out.'''
+    try:
+        sys.stdout.flush()
+    except Exception:
+        pass
     def py2shell(val):
         'convert python object into string that is useful to shell'
         if val is None or val is False: