Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/schemes/http.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2007-01-15 21:26:11 +0100
committerArthur de Jong <arthur@arthurdejong.org>2007-01-15 21:26:11 +0100
commit7cb6d8f88d3b2c4a9d72aa47d5fed6f734fdc312 (patch)
treedc659cb72712840ab31d4a18f68f1740e895569a /schemes/http.py
parent365624d94bd3bd3677230d2daa773b61bdc0f9f0 (diff)
catch any exception in HTTP module and report is as a link problem
git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@308 86f53f14-5ff3-0310-afe5-9b438ce3f40c
Diffstat (limited to 'schemes/http.py')
-rw-r--r--schemes/http.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/schemes/http.py b/schemes/http.py
index e581eb2..ee9b499 100644
--- a/schemes/http.py
+++ b/schemes/http.py
@@ -150,6 +150,13 @@ def fetch(link, acceptedtypes):
debugio.debug("error reading HTTP response: "+str(e))
link.add_linkproblem("error reading HTTP response: "+str(e))
return None
+ except Exception, e:
+ # handle all other exceptions
+ debugio.debug('unknown exception caught: '+str(e))
+ link.add_linkproblem('error reading HTTP response: '+str(e))
+ import traceback
+ traceback.print_exc()
+ return None
finally:
# close the connection before returning
if conn is not None: