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:37 UTC

svn commit: r1704919 - in /lucene/dev/branches/branch_5x: ./ dev-tools/ dev-tools/scripts/checkJavadocLinks.py

Author: mikemccand
Date: Wed Sep 23 19:17:37 2015
New Revision: 1704919

URL: http://svn.apache.org/viewvc?rev=1704919&view=rev
Log:
HTMLParserError is gone as of Python 3.5

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/dev-tools/   (props changed)
    lucene/dev/branches/branch_5x/dev-tools/scripts/checkJavadocLinks.py

Modified: lucene/dev/branches/branch_5x/dev-tools/scripts/checkJavadocLinks.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/dev-tools/scripts/checkJavadocLinks.py?rev=1704919&r1=1704918&r2=1704919&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/dev-tools/scripts/checkJavadocLinks.py (original)
+++ lucene/dev/branches/branch_5x/dev-tools/scripts/checkJavadocLinks.py Wed Sep 23 19:17:37 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)