diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-09-27 11:15:50 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-09-27 11:15:50 +0300 |
commit | d629ca9326f4693440b39f5fa73d62834279edbc (patch) | |
tree | 94043fdf691c9256f986ee5579927df26b2289f5 | |
parent | 25ddb866268f0b3d1798c1de81b65e7a6cf33e61 (diff) | |
download | ttystatus-d629ca9326f4693440b39f5fa73d62834279edbc.tar.gz |
Don't write anything if empty string
This avoids a bug where an app writes nothing, setting _first_output
to false, and then write something, and not getting enough space for
that, because the flag's already false.
-rw-r--r-- | ttystatus/messager.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ttystatus/messager.py b/ttystatus/messager.py index d5dce46..f4cd143 100644 --- a/ttystatus/messager.py +++ b/ttystatus/messager.py @@ -99,6 +99,8 @@ class Messager(object): def write(self, string): '''Write raw data, always.''' + if not string: + return self.update_width() rows = string.split('\n') |