summaryrefslogtreecommitdiffstats
path: root/Lib/xml
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-07-07 11:16:44 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-07-07 11:16:44 (GMT)
commita1c974a66de33b6439e970fbd6fab3a485ec96cc (patch)
tree49682c821ed59e4d23bf4831eab8571797ce2e2e /Lib/xml
parentfed2c51eea3383ab43e6f64da6e575dd62aa578e (diff)
downloadcpython-a1c974a66de33b6439e970fbd6fab3a485ec96cc.zip
cpython-a1c974a66de33b6439e970fbd6fab3a485ec96cc.tar.gz
cpython-a1c974a66de33b6439e970fbd6fab3a485ec96cc.tar.bz2
Minor refactoring in xml.etree.ElementTree doctype parser.
Diffstat (limited to 'Lib/xml')
-rw-r--r--Lib/xml/etree/ElementTree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index d30a83c..61fe155 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -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: