Fix error on Windows if "hg log | more" exits.
authorEung-Ju Park <eungju@gmail.com>
Tue, 28 Mar 2006 09:24:29 -0800
changeset 2013 65634e1038dd
parent 2010 db1eb0de286a
child 2014 416f9e9e5f1b
Fix error on Windows if "hg log | more" exits.
mercurial/ui.py
--- a/mercurial/ui.py	Mon Mar 27 08:31:33 2006 -0800
+++ b/mercurial/ui.py	Tue Mar 28 09:24:29 2006 -0800
@@ -197,10 +197,10 @@
                 raise
 
     def flush(self):
-        try:
-            sys.stdout.flush()
-        finally:
-            sys.stderr.flush()
+        try: sys.stdout.flush()
+        except: pass
+        try: sys.stderr.flush()
+        except: pass
 
     def readline(self):
         return sys.stdin.readline()[:-1]