From: Christian Heller Date: Mon, 18 Jan 2016 01:43:46 +0000 (+0100) Subject: Handle UnicodeDecodeError. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/ledger2?a=commitdiff_plain;h=4a2678aba39982c7912a697bf421d1fefb57ac41;p=plomlombot-irc.git Handle UnicodeDecodeError. --- diff --git a/plomlombot.py b/plomlombot.py index 4ec6646..7d0f535 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -109,7 +109,8 @@ def lineparser_loop(io, nickname): try: webpage = urllib.request.urlopen(request, timeout=15) except (urllib.error.HTTPError, urllib.error.URLError, - UnicodeError, http.client.BadStatusLine) as error: + UnicodeError, http.client.BadStatusLine, + UnicodeDecodeError) as error: print("TROUBLE FOLLOWING URL: " + str(error)) continue charset = webpage.info().get_content_charset()