commit:     aa0cf0c993759f559988c8d0d6ea50be8cf716ce
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 20 06:50:54 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jan 20 07:26:52 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=aa0cf0c9

Properly retrieve the count attribute and adjust logic to properly support both 
GLSA formats

X-Gentoo-Bug: 605612
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=605612

 pym/portage/glsa.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py
index 5e6662d..ea3819b 100644
--- a/pym/portage/glsa.py
+++ b/pym/portage/glsa.py
@@ -533,8 +533,8 @@ class Glsa:
                # <revised count="2">2007-12-30</revised>
                revisedEl = myroot.getElementsByTagName("revised")[0]
                self.revised = getText(revisedEl, format="strip")
-               count = revisedEl.attributes.get("count")
-               if count is None:
+               count = revisedEl.getAttribute("count")
+               if not count:
                        if self.revised.find(":") >= 0:
                                (self.revised, count) = self.revised.split(":")
                        else:

Reply via email to