Minor refactoring in xml.etree.ElementTree doctype parser.

This commit is contained in:
Florent Xicluna 2012-07-07 13:16:44 +02:00
parent fed2c51eea
commit a1c974a66d
1 changed files with 2 additions and 2 deletions

View File

@ -1597,13 +1597,13 @@ class XMLParser:
type = self._doctype[1]
if type == "PUBLIC" and n == 4:
name, type, pubid, system = self._doctype
if pubid:
pubid = pubid[1:-1]
elif type == "SYSTEM" and n == 3:
name, type, system = self._doctype
pubid = None
else:
return
if pubid:
pubid = pubid[1:-1]
if hasattr(self.target, "doctype"):
self.target.doctype(name, pubid, system[1:-1])
elif self.doctype != self._XMLParser__doctype: