FYI: I just realised that the python 3 io.BufferedReader.readline()
return a line of type bytes
. Python 2 returns str
.
So, if your plugin use LineProcessorStream
which includes BufferedReader
, make sure that you encode, decode the line before you make any string-checks/manipulation.
def process_line(self, origLine):
line = origLine.decode('utf-8')
# do your thing
...
line = line.encode('utf-8')