20try:
21 from html.parser import HTMLParser
22▶except ImportError:
23 from HTMLParser import HTMLParser
24try:
· · ·
25 from xml.etree import cElementTree as ET
26▶except ImportError:
27 from xml.etree import ElementTree as ET
28
· · ·
29try:
30 from html.entities import name2codepoint
31▶except ImportError:
32 from htmlentitydefs import name2codepoint
33
· · ·
55try:
56 unichr # noqa: B018 FIXME: py2
57▶except NameError:
58 unichr = chr
59
· · ·
183 try:
184 args = shlex.split(args)
185▶ except UnicodeEncodeError:
186 args = [
187 arg.decode("utf-8") for arg in shlex.split(args.encode("utf-8"))
+ 8 more matches in this file