diff mercurial/util.py @ 4134:9dc64c8414ca

Merge with crew-stable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 04 Mar 2007 09:03:21 -0300
parents c08b6af023bc e817c68edfed
children b5d1eaade333
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -790,6 +790,14 @@ if os.name == 'nt':
                 if inst.errno != 0: raise
                 self.close()
                 raise IOError(errno.EPIPE, 'Broken pipe')
+                
+        def flush(self):
+            try:
+                return self.fp.flush()
+            except IOError, inst:
+                if inst.errno != errno.EINVAL: raise
+                self.close()
+                raise IOError(errno.EPIPE, 'Broken pipe')
 
     sys.stdout = winstdout(sys.stdout)