Don't crash on invalid UTF8

Apparently this is the correct solution to the problem according
to the library author:

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

Change-Id: Ie3661af84982bd54cebd1456b211cedb5495e2bb
This commit is contained in:
James E. Blair 2014-03-06 15:53:21 -08:00
parent a104892265
commit 5d6e389bd3
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ except:
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 UpdateInterface(object):
def alert(self, msg=None):
pass