From 12214d9dbf163cddd4a439207669ff06f5726b6c Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 7 May 2009 21:59:25 +0000 Subject: [PATCH] Add patch from Robert Buchholz: Allow GLSA 2 DTD in doctype declaration svn path=/trunk/gentoolkit/; revision=627 --- pym/gentoolkit/glsa/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/gentoolkit/glsa/__init__.py b/pym/gentoolkit/glsa/__init__.py index 1389028..b7985d9 100644 --- a/pym/gentoolkit/glsa/__init__.py +++ b/pym/gentoolkit/glsa/__init__.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