Mercurial > p > roundup > code
diff test/html_norm.py @ 6996:3546f23ea493
Add support for python2.
My development install has a backport for html.parser so it didn't
fail import but did in CI.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 02 Oct 2022 23:46:24 -0400 |
| parents | dc83ebff4c90 |
| children | 5bc36b65d06b |
line wrap: on
line diff
--- a/test/html_norm.py Sun Oct 02 23:18:43 2022 -0400 +++ b/test/html_norm.py Sun Oct 02 23:46:24 2022 -0400 @@ -18,7 +18,10 @@ tests. """ -from html.parser import HTMLParser +try: + from html.parser import HTMLParser +except ImportError: + from HTMLParser import HTMLParser # python2 try: from htmlentitydefs import name2codepoint
