home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b4d6c5
)
Handle UnicodeError in URL parsing.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Jan 2016 22:33:59 +0000
(23:33 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Jan 2016 22:33:59 +0000
(23:33 +0100)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index dc6577a554841a0a218f20c5ae936c142a54d12f..6112dcb879084dacfd971aabc7486c3a40ea4200 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-100,8
+100,8
@@
def lineparser_loop(io, nickname):
url = matches[i]
try:
webpage = urllib.request.urlopen(url, timeout=15)
- except (urllib.error.HTTPError, urllib.error.URLError
) \
- as error:
+ except (urllib.error.HTTPError, urllib.error.URLError
,
+
UnicodeError)
as error:
print("TROUBLE FOLLOWING URL: " + str(error))
continue
charset = webpage.info().get_content_charset()