mercurial/ui.py
changeset 1609 c50bddfbc812
parent 1569 dd186cb70a64
child 1637 3b1b44b917f4
--- a/mercurial/ui.py	Mon Jan 02 14:31:25 2006 -0800
+++ b/mercurial/ui.py	Mon Jan 02 15:25:33 2006 -0800
@@ -110,7 +110,7 @@
             sys.stdout.write(str(a))
 
     def write_err(self, *args):
-        sys.stdout.flush()
+        if not sys.stdout.closed: sys.stdout.flush()
         for a in args:
             sys.stderr.write(str(a))