public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14422 - main/trunk/pym/portage
@ 2009-09-25  5:56 Arfrever Frehtes Taifersar Arahesis (arfrever)
  0 siblings, 0 replies; only message in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-09-25  5:56 UTC (permalink / raw
  To: gentoo-commits

Author: arfrever
Date: 2009-09-25 05:56:25 +0000 (Fri, 25 Sep 2009)
New Revision: 14422

Modified:
   main/trunk/pym/portage/glsa.py
Log:
Use 'in' instead of has_key() in portage.glsa.Glsa.parse() when Python 3 is used.


Modified: main/trunk/pym/portage/glsa.py
===================================================================
--- main/trunk/pym/portage/glsa.py	2009-09-25 05:29:02 UTC (rev 14421)
+++ main/trunk/pym/portage/glsa.py	2009-09-25 05:56:25 UTC (rev 14422)
@@ -511,7 +511,8 @@
 		# <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(":")




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-25  5:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-25  5:56 [gentoo-commits] portage r14422 - main/trunk/pym/portage Arfrever Frehtes Taifersar Arahesis (arfrever)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox