warp all urlib-specific stuff in an exception

This commit is contained in:
urlbot
2014-10-11 16:22:19 +02:00
parent 76fd4645c8
commit 94c538696f

View File

@@ -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')