diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 9f890888..19ac76af 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -85,7 +85,7 @@ def updatestatus(stateinfo={}): info.append(laststate['error']) if 'clientcount' in laststate and laststate['clientcount'] != 1: info.append('clients: %d' % laststate['clientcount']) - if 'bufferage' in stateinfo: + if 'bufferage' in stateinfo and stateinfo['bufferage'] is not None: laststate['showtime'] = time.time() - stateinfo['bufferage'] if 'showtime' in laststate: showtime = laststate['showtime'] @@ -561,7 +561,7 @@ elif shellargs: command = " ".join(shellargs) do_command(command, netserver) quitconfetty(fullexit=True) -while not doexit: +while inconsole or not doexit: if inconsole: rdylist, _, _ = select.select( (sys.stdin, session.connection), (), (), 60) diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index 6a87e6a6..ea4a93be 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -479,7 +479,7 @@ class ConsoleSession(object): """Get the age in seconds of the buffered data Returns False if no data buffered yet""" - self.conshdl.get_buffer_age() + return self.conshdl.get_buffer_age() def reopen(self): self.conshdl.reopen() diff --git a/confluent_server/confluent/log.py b/confluent_server/confluent/log.py index 90c11235..ea87c291 100644 --- a/confluent_server/confluent/log.py +++ b/confluent_server/confluent/log.py @@ -189,7 +189,7 @@ class Logger(object): textfile = open(self.textpath, mode='r') binfile = open(self.binpath, mode='r') except IOError: - return '', 0 + return '', 0, 0 fcntl.flock(binfile, fcntl.LOCK_SH) binfile.seek(0, 2) binidx = binfile.tell() - 16