merge with crew
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Fri, 12 Feb 2010 16:04:00 +0100
changeset 10426 5a3a916aad58
parent 10425 f8a9de664a1c (current diff)
parent 10421 452b6195e94c (diff)
child 10427 400ffd5f2f14
child 10436 6cebf27287de
merge with crew
mercurial/ui.py
--- a/mercurial/ui.py	Sun Feb 07 10:25:18 2010 -0600
+++ b/mercurial/ui.py	Fri Feb 12 16:04:00 2010 +0100
@@ -237,13 +237,13 @@
 
     def write_err(self, *args):
         try:
-            if not hasattr(sys.stdout, 'closed') or not sys.stdout.closed:
+            if not getattr(sys.stdout, 'closed', False):
                 sys.stdout.flush()
             for a in args:
                 sys.stderr.write(str(a))
             # stderr may be buffered under win32 when redirected to files,
             # including stdout.
-            if not sys.stderr.closed:
+            if not getattr(sys.stderr, 'closed', False):
                 sys.stderr.flush()
         except IOError, inst:
             if inst.errno != errno.EPIPE: