diff --git a/linkcheck/parser/__init__.py b/linkcheck/parser/__init__.py index 0f584f35..0d5dd0b2 100644 --- a/linkcheck/parser/__init__.py +++ b/linkcheck/parser/__init__.py @@ -116,14 +116,8 @@ def find_links (url_data, callback, tags): """Parse into content and search for URLs to check. Found URLs are added to the URL queue. """ - # construct handler object handler = linkparse.LinkFinder(callback, tags) - # parse - try: - htmlsoup.process_soup(handler, url_data.get_soup()) - except linkparse.StopParse as msg: - log.debug(LOG_CHECK, "Stopped parsing: %s", msg) - pass + htmlsoup.process_soup(handler, url_data.get_soup()) def parse_firefox (url_data): diff --git a/tests/test_linkparser.py b/tests/test_linkparser.py index 94171aa8..7cc3e930 100644 --- a/tests/test_linkparser.py +++ b/tests/test_linkparser.py @@ -30,10 +30,7 @@ class TestLinkparser (unittest.TestCase): def _test_one_link (self, content, url): self.count_url = 0 h = linkparse.LinkFinder(self._test_one_url(url), linkparse.LinkTags) - try: - htmlsoup.process_soup(h, htmlsoup.make_soup(content)) - except linkparse.StopParse: - pass + htmlsoup.process_soup(h, htmlsoup.make_soup(content)) self.assertEqual(self.count_url, 1) def _test_one_url (self, origurl): @@ -47,10 +44,7 @@ class TestLinkparser (unittest.TestCase): def callback (url, line, column, name, base): self.assertTrue(False, 'URL %r found' % url) h = linkparse.LinkFinder(callback, linkparse.LinkTags) - try: - htmlsoup.process_soup(h, htmlsoup.make_soup(content)) - except linkparse.StopParse: - pass + htmlsoup.process_soup(h, htmlsoup.make_soup(content)) def test_href_parsing (self): # Test parsing.