From 2bc2711d9b8b2245c89d0b2beedd15cbc18d29ae Mon Sep 17 00:00:00 2001 From: Robin Kearney Date: Sun, 5 Nov 2017 05:23:28 +0000 Subject: [PATCH] Fixes #27 This fixes a crash if the line is unreadable, forcing to UTF8 means parsing of the log continues. --- mclogalyzer/mclogalyzer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mclogalyzer/mclogalyzer.py b/mclogalyzer/mclogalyzer.py index 4d4e6a7..e4e2ba2 100755 --- a/mclogalyzer/mclogalyzer.py +++ b/mclogalyzer/mclogalyzer.py @@ -26,8 +26,10 @@ import sys import time -import jinja2 +reload(sys) +sys.setdefaultencoding('utf8') +import jinja2 REGEX_IP = "(\d+)\.(\d+)\.(\d+)\.(\d+)"