Fixed issue with bot crashing when processing a None message
This commit is contained in:
父節點
39be6ea582
當前提交
f8559bbc12
@ -237,6 +237,8 @@ class Bot(irc.bot.SingleServerIRCBot):
|
|||||||
self.process_output(c, chan, output)
|
self.process_output(c, chan, output)
|
||||||
|
|
||||||
def process_output(self, c, chan, output):
|
def process_output(self, c, chan, output):
|
||||||
|
if not output.msg:
|
||||||
|
return
|
||||||
for msg in output.msg:
|
for msg in output.msg:
|
||||||
if len(msg.encode('UTF-8')) > 512:
|
if len(msg.encode('UTF-8')) > 512:
|
||||||
self.logger.error('output message too long: {}'.format(msg))
|
self.logger.error('output message too long: {}'.format(msg))
|
||||||
|
載入中…
x
新增問題並參考
Block a user