Don't crash on UTF8 errors

https://bitbucket.org/jaraco/irc/issue/34/irc-client-should-not-crash-on-failed

Change-Id: Ifb56ce80a170baf8c36a5fa1a2d0c88ea13885a5
This commit is contained in:
James E. Blair 2014-03-07 07:22:31 -08:00
parent c67b4fcdce
commit 4d99747b70
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,12 @@ except Exception:
pid_file_module = daemon.pidfile
# https://bitbucket.org/jaraco/irc/issue/34/
# irc-client-should-not-crash-on-failed
# ^ This is why pep8 is a bad idea.
irc.client.ServerConnection.buffer_class.errors = 'replace'
class GerritBot(irc.bot.SingleServerIRCBot):
def __init__(self, channels, nickname, password, server, port=6667,
server_password=None):