mercurial/ui.py
changeset 10383 f83291e5643e
parent 10282 08a0f04b56bd
child 10421 452b6195e94c
child 10425 f8a9de664a1c
--- a/mercurial/ui.py	Sun Feb 07 16:03:38 2010 +0100
+++ b/mercurial/ui.py	Sun Feb 07 16:44:55 2010 +0100
@@ -237,7 +237,7 @@
 
     def write_err(self, *args):
         try:
-            if not sys.stdout.closed:
+            if not hasattr(sys.stdout, 'closed') or not sys.stdout.closed:
                 sys.stdout.flush()
             for a in args:
                 sys.stderr.write(str(a))