ignore invalid utf8 in markov log imports

This commit is contained in:
jesopo 2019-10-10 16:36:59 +01:00
parent fe1c2c0205
commit c2f075599d

View file

@ -46,7 +46,7 @@ class Module(ModuleManager.BaseModule):
event["stderr"].write("Failed to load log (%d)" % page.code)
def _load_loop(self, channel_id, data):
for line in data.decode("utf8").split("\n"):
for line in data.decode("utf8", errors="ignore").split("\n"):
self.bot.trigger(self._create_factory(channel_id, line.strip()))
self._load_thread = None
def _create_factory(self, channel_id, line):