mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-19 22:01:00 +00:00
catch max recusion limit error
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@573 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
288c7b8800
commit
5be54dab72
1 changed files with 9 additions and 2 deletions
|
|
@ -259,7 +259,7 @@ class UrlData:
|
|||
try:
|
||||
self._check()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
raise
|
||||
except (socket.error, select.error):
|
||||
# on Unix, ctrl-c can raise
|
||||
# error: (4, 'Interrupted system call')
|
||||
|
|
@ -501,7 +501,14 @@ class UrlData:
|
|||
else:
|
||||
tag = ''
|
||||
while 1:
|
||||
match = pattern['pattern'].search(self.getContent(), index)
|
||||
try:
|
||||
match = pattern['pattern'].search(self.getContent(), index)
|
||||
except RuntimeError, msg:
|
||||
self.setError(linkcheck._("""Could not parse HTML content (%s).
|
||||
You may have a syntax error.
|
||||
LinkChecker is skipping the remaining content for the link type
|
||||
<%s %s>.""") % (msg, "|".join(pattern['tags']), "|".join(pattern['attrs'])))
|
||||
break
|
||||
if not match: break
|
||||
index = match.end()
|
||||
if self.is_in_comment(match.start()): continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue