mercurial/ui.py
changeset 4023 6ea8a3b805ee
parent 3989 e492ab235b4d
child 4045 1bd6868b0b11
equal deleted inserted replaced
4022:bf329bda51a6 4023:6ea8a3b805ee
   383     def write_err(self, *args):
   383     def write_err(self, *args):
   384         try:
   384         try:
   385             if not sys.stdout.closed: sys.stdout.flush()
   385             if not sys.stdout.closed: sys.stdout.flush()
   386             for a in args:
   386             for a in args:
   387                 sys.stderr.write(str(a))
   387                 sys.stderr.write(str(a))
       
   388             # stderr may be buffered under win32 when redirected to files,
       
   389             # including stdout.
       
   390             if not sys.stderr.closed: sys.stderr.flush()
   388         except IOError, inst:
   391         except IOError, inst:
   389             if inst.errno != errno.EPIPE:
   392             if inst.errno != errno.EPIPE:
   390                 raise
   393                 raise
   391 
   394 
   392     def flush(self):
   395     def flush(self):