ignore invalid utf8 in markov log imports
This commit is contained in:
parent
fe1c2c0205
commit
c2f075599d
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
event["stderr"].write("Failed to load log (%d)" % page.code)
|
event["stderr"].write("Failed to load log (%d)" % page.code)
|
||||||
|
|
||||||
def _load_loop(self, channel_id, data):
|
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.bot.trigger(self._create_factory(channel_id, line.strip()))
|
||||||
self._load_thread = None
|
self._load_thread = None
|
||||||
def _create_factory(self, channel_id, line):
|
def _create_factory(self, channel_id, line):
|
||||||
|
|
Loading…
Reference in a new issue