From d629ca9326f4693440b39f5fa73d62834279edbc Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 27 Sep 2015 11:15:50 +0300 Subject: 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. --- ttystatus/messager.py | 2 ++ 1 file changed, 2 insertions(+) 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') -- cgit v1.2.1