diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-08-29 18:32:14 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-08-29 18:32:14 +0100 |
commit | 283cb2fd81cf442e59dd41af17795f666b1f2f45 (patch) | |
tree | aa3f337dc1efcd2595e328af7783c7b9de1f8dd8 | |
parent | 7926271cfb87478f8884c14563e48e94b128d291 (diff) | |
download | python-ttystatus-283cb2fd81cf442e59dd41af17795f666b1f2f45.tar.gz |
Write notifications to stdout, not the terminal.
-rw-r--r-- | ttystatus/messager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ttystatus/messager.py b/ttystatus/messager.py index bcbceca..7237ea0 100644 --- a/ttystatus/messager.py +++ b/ttystatus/messager.py @@ -133,10 +133,11 @@ class Messager(object): old = self._last_msg self.clear() try: - self.output.write('%s\n' % string) + sys.stdout.write('%s\n' % string) + sys.stdout.flush() except IOError: # pragma: no cover # We ignore these. No point in crashing if terminal is bad. - self.output.flush() + pass self._overwrite(old) def finish(self): |