mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Consistently return string from consume_termdata
If None is allowed to return, it can mess up caller.
This commit is contained in:
parent
a23d5b9b55
commit
b139f9cd2c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user