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:
20c385a
)
In URL parser, add http.client.BadStatusLine handler.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Jan 2016 23:00:34 +0000
(
00:00
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Jan 2016 23:00:34 +0000
(
00:00
+0100)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index 5fcd517a95f563cfba7a00146d1e6359780a0472..c1c23089ba01450ef5f2cd686f000580e44398cb 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-7,6
+7,7
@@
import select
import time
import re
import urllib.request
+import http.client
import html
# Defaults, may be overwritten by command line arguments.
@@
-105,7
+106,7
@@
def lineparser_loop(io, nickname):
try:
webpage = urllib.request.urlopen(url, timeout=15)
except (urllib.error.HTTPError, urllib.error.URLError,
- UnicodeError) as error:
+ UnicodeError
, http.client.BadStatusLine
) as error:
print("TROUBLE FOLLOWING URL: " + str(error))
continue
charset = webpage.info().get_content_charset()