mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-15 12:17:47 +00:00
Rework get_next_output
Use try/except to catch nonetype case. For whatever reason, databuffer could still be None, this should take care of that.
This commit is contained in:
parent
892b6b53dd
commit
c537a124cf
@ -142,12 +142,13 @@ class ConsoleSession(object):
|
||||
self.reaper.cancel()
|
||||
currtime = util.monotonic_time()
|
||||
deadline = currtime + 45
|
||||
if self.databuffer is None:
|
||||
try:
|
||||
while len(self.databuffer) == 0 and currtime < deadline:
|
||||
timeo = deadline - currtime
|
||||
self.conshdl._console.wait_for_data(timeout=timeo)
|
||||
currtime = util.monotonic_time()
|
||||
except TypeError:
|
||||
return ""
|
||||
while len(self.databuffer) == 0 and currtime < deadline:
|
||||
timeo = deadline - currtime
|
||||
self.conshdl._console.wait_for_data(timeout=timeo)
|
||||
currtime = util.monotonic_time()
|
||||
retval = self.databuffer
|
||||
self.databuffer = ""
|
||||
self.reaper = eventlet.spawn_after(15, self.destroy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user