From 1dd031f0a5457b9b53c7a3027b29cea9278f81ec Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 25 Sep 2009 05:56:25 +0000 Subject: [PATCH] Use 'in' instead of has_key() in portage.glsa.Glsa.parse() when Python 3 is used. svn path=/main/trunk/; revision=14422 --- pym/portage/glsa.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py index 4049efc2d..4684ea420 100644 --- a/pym/portage/glsa.py +++ b/pym/portage/glsa.py @@ -511,7 +511,8 @@ class Glsa: # 2007-12-30 revisedEl = myroot.getElementsByTagName("revised")[0] self.revised = getText(revisedEl, format="strip") - if (revisedEl.attributes.has_key("count")): + if ((sys.hexversion >= 0x3000000 and "count" in revisedEl.attributes) or + (sys.hexversion < 0x3000000 and revisedEl.attributes.has_key("count"))): count = revisedEl.getAttribute("count") elif (self.revised.find(":") >= 0): (self.revised, count) = self.revised.split(":") -- 2.26.2