2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-23 19:52:10 +00:00

Fix source of abnormal console exit

If using ctrl-e, c, then a delay while
there is console output to do,
console would crash.

Fix by catching the flush problem
and ignoring it.
This commit is contained in:
Jarrod Johnson 2020-06-18 13:09:48 -04:00
parent 9cc5b5f98c
commit 095a831c0b

View File

@ -958,7 +958,13 @@ def main():
# don't bother churning if minute does not change
laststate['showtime'] = now
updatestatus()
sys.stdout.flush()
try:
sys.stdout.flush()
except Exception:
# EWOULDBLOCK causes this to raise, ignore
# this scenario comfortable that it
# will come out soon enough
pass
else:
deadline = 5
connected = False