--- 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))