Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 10426:5a3a916aad58
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 12 Feb 2010 16:04:00 +0100 |
parents | f8a9de664a1c 452b6195e94c |
children | 40dfd46d098f |
comparison
equal
deleted
inserted
replaced
10425:f8a9de664a1c | 10426:5a3a916aad58 |
---|---|
235 for a in args: | 235 for a in args: |
236 sys.stdout.write(str(a)) | 236 sys.stdout.write(str(a)) |
237 | 237 |
238 def write_err(self, *args): | 238 def write_err(self, *args): |
239 try: | 239 try: |
240 if not hasattr(sys.stdout, 'closed') or not sys.stdout.closed: | 240 if not getattr(sys.stdout, 'closed', False): |
241 sys.stdout.flush() | 241 sys.stdout.flush() |
242 for a in args: | 242 for a in args: |
243 sys.stderr.write(str(a)) | 243 sys.stderr.write(str(a)) |
244 # stderr may be buffered under win32 when redirected to files, | 244 # stderr may be buffered under win32 when redirected to files, |
245 # including stdout. | 245 # including stdout. |
246 if not sys.stderr.closed: | 246 if not getattr(sys.stderr, 'closed', False): |
247 sys.stderr.flush() | 247 sys.stderr.flush() |
248 except IOError, inst: | 248 except IOError, inst: |
249 if inst.errno != errno.EPIPE: | 249 if inst.errno != errno.EPIPE: |
250 raise | 250 raise |
251 | 251 |