You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2015/09/23 21:17:19 UTC
svn commit: r1704918 -
/lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
Author: mikemccand
Date: Wed Sep 23 19:17:19 2015
New Revision: 1704918
URL: http://svn.apache.org/viewvc?rev=1704918&view=rev
Log:
HTMLParserError is gone as of Python 3.5
Modified:
lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
Modified: lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py?rev=1704918&r1=1704917&r2=1704918&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py (original)
+++ lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py Wed Sep 23 19:17:19 2015
@@ -17,7 +17,7 @@ import traceback
import os
import sys
import re
-from html.parser import HTMLParser, HTMLParseError
+from html.parser import HTMLParser
import urllib.parse as urlparse
reHyperlink = re.compile(r'<a(\s+.*?)>', re.I)
@@ -109,7 +109,8 @@ def parse(baseURL, html):
try:
parser.feed(html)
parser.close()
- except HTMLParseError:
+ except:
+ # TODO: Python's html.parser is now always lenient, which is no good for us: we want correct HTML in our javadocs
parser.printFile()
print(' WARNING: failed to parse %s:' % baseURL)
traceback.print_exc(file=sys.stdout)