dodge another unicode crash

This commit is contained in:
Brian S. Stephan 2010-11-22 20:25:28 -06:00
parent daa018c64b
commit f4dc667c77
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ class MegaHAL(Module):
line = addressed_re.sub('', line)
append_nick = True
reply = self.megahal.get_reply(line)
try:
reply = self.megahal.get_reply(line)
except UnicodeDecodeError: pass
elif re.search('^megahal$', line, re.IGNORECASE) is not None:
reply = self.megahal.get_reply_nolearn('')
else: