From 4a2678aba39982c7912a697bf421d1fefb57ac41 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 18 Jan 2016 02:43:46 +0100 Subject: [PATCH] Handle UnicodeDecodeError. --- plomlombot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.30.2