From ad51923997dcc8d85c26d75dd7437f019904bb54 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Mon, 19 Oct 2015 09:23:31 +0200 Subject: [PATCH] try to read non-line-wise in follow --- follow.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/follow.py b/follow.py index c35a354..bd14a05 100644 --- a/follow.py +++ b/follow.py @@ -290,13 +290,14 @@ class Follower(object): .format(desc)) # read line from source - line = source.readline() + line = source.read() # was readline(), but try something else + # removed the rstrip() from return if not line: continue # if reach here, we have a new line of text - return source, desc, line.strip(), flags + return source, desc, line, flags # for poll results # end: inf loop # end: Follower._next_line -- 1.7.1