decode string before splitting it.

This commit is contained in:
Yann Leboulanger 2008-09-08 18:36:15 +00:00
parent 3b4875e38e
commit 8d3c1c59ad
1 changed files with 1 additions and 2 deletions

View File

@ -722,8 +722,7 @@ class Logger:
# ..., 'FEAT', feature1, feature2, ...).join(' '))
# NOTE: if there's a need to do more gzip, put that to a function
try:
data = GzipFile(fileobj=StringIO(str(data))).read().split('\0')
data = data.decode('utf-8')
data = GzipFile(fileobj=StringIO(str(data))).read().decode('utf-8').split('\0')
except IOError:
# This data is corrupted. It probably contains non-ascii chars
to_be_removed.append((hash_method, hash))