From: fuzzyray Date: Thu, 7 May 2009 21:50:42 +0000 (-0000) Subject: Add patch from Robert Buchholz: Allow GLSA 2 DTD in doctype declaration X-Git-Tag: gentoolkit-0.2.4.4~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3a9a3d157704ffb142098f8d6db61c4bb0c92e5d;p=gentoolkit.git Add patch from Robert Buchholz: Allow GLSA 2 DTD in doctype declaration svn path=/branches/gentoolkit-0.2.4/; revision=622 --- diff --git a/src/glsa-check/glsa.py b/src/glsa-check/glsa.py index ffe6594..0931908 100644 --- a/src/glsa-check/glsa.py +++ b/src/glsa-check/glsa.py @@ -470,7 +470,11 @@ class Glsa: self.DOM = xml.dom.minidom.parse(myfile) if not self.DOM.doctype: raise GlsaTypeException(None) - elif self.DOM.doctype.systemId != "http://www.gentoo.org/dtd/glsa.dtd": + elif self.DOM.doctype.systemId == "http://www.gentoo.org/dtd/glsa.dtd": + self.dtdversion = 0 + elif self.DOM.doctype.systemId == "http://www.gentoo.org/dtd/glsa-2.dtd": + self.dtdversion = 2 + else: raise GlsaTypeException(self.DOM.doctype.systemId) myroot = self.DOM.getElementsByTagName("glsa")[0] if self.type == "id" and myroot.getAttribute("id") != self.nr: