From 6b4d6c5c7ad1a3cd855572e54b43a72a60191d17 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 17 Jan 2016 23:29:11 +0100
Subject: [PATCH] Handle URLError.

---
 plomlombot.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plomlombot.py b/plomlombot.py
index 9a8a853..dc6577a 100755
--- a/plomlombot.py
+++ b/plomlombot.py
@@ -100,7 +100,8 @@ def lineparser_loop(io, nickname):
                 url = matches[i]
                 try:
                     webpage = urllib.request.urlopen(url, timeout=15)
-                except urllib.error.HTTPError as error:
+                except (urllib.error.HTTPError, urllib.error.URLError) \
+                    as error:
                     print("TROUBLE FOLLOWING URL: " + str(error))
                     continue
                 charset = webpage.info().get_content_charset()
-- 
2.30.2