Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 1837:6f67a4c93493
make ui flush output. this makes error happen if printing to /dev/full.
before this change, error happened with some pythons, but not others.
now always happens.
fixes issue 155.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 06 Mar 2006 08:35:15 -0800 |
parents | 3b1b44b917f4 |
children | d17f19d84fd3 |
line wrap: on
line diff
--- a/mercurial/ui.py Sun Mar 05 01:37:28 2006 -0800 +++ b/mercurial/ui.py Mon Mar 06 08:35:15 2006 -0800 @@ -132,6 +132,12 @@ for a in args: sys.stderr.write(str(a)) + def flush(self): + try: + sys.stdout.flush() + finally: + sys.stderr.flush() + def readline(self): return sys.stdin.readline()[:-1] def prompt(self, msg, pat, default="y"):