diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-25 05:56:25 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-25 05:56:25 +0000 |
commit | 1dd031f0a5457b9b53c7a3027b29cea9278f81ec (patch) | |
tree | f7df509eb112d8a11823233acd9d0357b678cd80 | |
parent | 6379e5dd27b5fd76939ac7d3a0ba07520451cd90 (diff) | |
download | portage-1dd031f0a5457b9b53c7a3027b29cea9278f81ec.tar.gz portage-1dd031f0a5457b9b53c7a3027b29cea9278f81ec.tar.bz2 portage-1dd031f0a5457b9b53c7a3027b29cea9278f81ec.zip |
Use 'in' instead of has_key() in portage.glsa.Glsa.parse() when Python 3 is used.
svn path=/main/trunk/; revision=14422
-rw-r--r-- | pym/portage/glsa.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: # <revised count="2">2007-12-30</revised> 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(":") |