From 94c538696f3bb8a76bec38b8156d80257aa52d51 Mon Sep 17 00:00:00 2001 From: urlbot Date: Sat, 11 Oct 2014 16:22:19 +0200 Subject: [PATCH] warp all urlib-specific stuff in an exception --- urlbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urlbot.py b/urlbot.py index 928f3fd..8d3b186 100755 --- a/urlbot.py +++ b/urlbot.py @@ -22,7 +22,7 @@ def fetch_page(url): html_text = response.read(BUFSIZ) # ignore more than BUFSIZ response.close() return (0, html_text, response.headers) - except IOError as e: + except Exception as e: logger('warn', 'failed: ' + str(e)) return (1, str(e), 'dummy')