From e96e4bd5273db78b21f6b6979c1a8150f0cdced6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 18 Mar 2014 16:30:37 -0400 Subject: [PATCH] Fix bug with log replay without log Without log, termstate was left as non-numeric None. Correct to set to zero if still None by the time return happens. --- confluent/log.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent/log.py b/confluent/log.py index 7ffab148..5a56d755 100644 --- a/confluent/log.py +++ b/confluent/log.py @@ -180,6 +180,8 @@ class Logger(object): textdata += textfile.read(len) fcntl.flock(textfile, fcntl.LOCK_UN) textfile.close() + if termstate is None: + termstate = 0 return (textdata, termstate) def log(self, logdata=None, ltype=None, event=0, eventdata=None):