summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2021-10-12 17:12:21 (GMT)
committerGitHub <noreply@github.com>2021-10-12 17:12:21 (GMT)
commit562c0d7398b9f34ff63a1dc77113dad96a93ce4e (patch)
tree3cbcdfcf481cbaa4995ccbb95401ad5a37f31e60 /Lib
parentcfb1df3b71501a80ed57739181ec2ed30012c491 (diff)
downloadcpython-562c0d7398b9f34ff63a1dc77113dad96a93ce4e.zip
cpython-562c0d7398b9f34ff63a1dc77113dad96a93ce4e.tar.gz
cpython-562c0d7398b9f34ff63a1dc77113dad96a93ce4e.tar.bz2
bpo-45421: Remove dead code from html.parser (GH-28847)
Support for HtmlParserError was removed back in 2014 with commit 73a4359eb0eb624c588c5d52083ea4944f9787ea, however this small block was missed.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/html/parser.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 58f6bb3..bef0f4f 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -328,13 +328,6 @@ class HTMLParser(_markupbase.ParserBase):
end = rawdata[k:endpos].strip()
if end not in (">", "/>"):
- lineno, offset = self.getpos()
- if "\n" in self.__starttag_text:
- lineno = lineno + self.__starttag_text.count("\n")
- offset = len(self.__starttag_text) \
- - self.__starttag_text.rfind("\n")
- else:
- offset = offset + len(self.__starttag_text)
self.handle_data(rawdata[i:endpos])
return endpos
if end.endswith('/>'):