From 3a9a3d157704ffb142098f8d6db61c4bb0c92e5d Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 7 May 2009 21:50:42 +0000 Subject: [PATCH] Add patch from Robert Buchholz: Allow GLSA 2 DTD in doctype declaration svn path=/branches/gentoolkit-0.2.4/; revision=622 --- src/glsa-check/glsa.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- 2.26.2