From 83499617458a93217e8f1ed5194c16f2b3bedc40 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 1 Jul 2008 12:38:49 +0000 Subject: Py3k compatibility patch #1 by Ali Polatel . Replace dict.has_key() calls with "in" and "not in" operators.. svn path=/main/trunk/; revision=10870 --- pym/portage/glsa.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/portage/glsa.py') diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py index 2d2f27b30..4dc05f7e1 100644 --- a/pym/portage/glsa.py +++ b/pym/portage/glsa.py @@ -92,7 +92,7 @@ def get_glsa_list(myconfig): """ rValue = [] - if myconfig.has_key("GLSA_DIR"): + if "GLSA_DIR" in myconfig: repository = myconfig["GLSA_DIR"] else: repository = os.path.join(myconfig["PORTDIR"], "metadata", "glsa") @@ -407,7 +407,7 @@ class Glsa: @rtype: None @return: None """ - if self.config.has_key("GLSA_DIR"): + if "GLSA_DIR" in self.config: repository = "file://" + self.config["GLSA_DIR"]+"/" else: repository = "file://" + self.config["PORTDIR"] + "/metadata/glsa/" @@ -470,7 +470,7 @@ class Glsa: self.packages = {} for p in self.affected.getElementsByTagName("package"): name = p.getAttribute("name") - if not self.packages.has_key(name): + if name not in self.packages: self.packages[name] = [] tmp = {} tmp["arch"] = p.getAttribute("arch") -- cgit v1.2.3-65-gdbad