diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-07-09 20:22:57 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-07-09 20:22:57 +0100 |
commit | 2b649c24e43d9e171e15238f07e14f79d446a0bb (patch) | |
tree | 61c847fd90141e094bc94466897277dcd7312b26 | |
parent | 2689b34c8bb1376b11b23b89109d53488b65de74 (diff) | |
download | ttystatus-2b649c24e43d9e171e15238f07e14f79d446a0bb.tar.gz |
Force .error to always output
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | ttystatus/messager.py | 4 | ||||
-rw-r--r-- | ttystatus/status.py | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,6 +1,12 @@ NEWS file for ttystatus ======================= +Version 0.20, released UNRELEASED +--------------------------------- + +* `TerminalStatus.error` now always outputs. Error messages are too valuable + to lose. + Version 0.19, released 2012-06-30 --------------------------------- diff --git a/ttystatus/messager.py b/ttystatus/messager.py index d18d188..011c9a3 100644 --- a/ttystatus/messager.py +++ b/ttystatus/messager.py @@ -115,7 +115,7 @@ class Messager(object): '''Remove current message from terminal.''' self._overwrite('') - def notify(self, string, f): + def notify(self, string, f, force=False): '''Show a notification message string to the user. Notifications are meant for error messages and other things @@ -128,7 +128,7 @@ class Messager(object): ''' - if self._enabled: + if self._enabled or force: old = self._last_msg self.clear() try: diff --git a/ttystatus/status.py b/ttystatus/status.py index 82457b2..1c3e19d 100644 --- a/ttystatus/status.py +++ b/ttystatus/status.py @@ -116,7 +116,7 @@ class TerminalStatus(object): def error(self, msg): '''Write an error message.''' - self._m.notify(msg, sys.stderr) + self._m.notify(msg, sys.stderr, force=True) def finish(self): '''Finish status display.''' |