From b139f9cd2c39df29549164f16f5bc6bea7857f0f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 5 Nov 2021 11:30:43 -0400 Subject: [PATCH] Consistently return string from consume_termdata If None is allowed to return, it can mess up caller. --- confluent_client/bin/confetty | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index fec114c7..2d53cdaf 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -972,7 +972,7 @@ def consume_termdata(fh, bufferonly=False): data = None if type(data) == dict: updatestatus(data) - return + return '' if data is not None: data = client.stringify(data) if clearpowermessage: @@ -1021,6 +1021,7 @@ def consume_termdata(fh, bufferonly=False): doexit = True inconsole = False sys.stdout.write("\r\n[remote disconnected]\r\n") + return '' if __name__ == '__main__': errcode = 0