diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-01 12:38:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-01 12:38:49 +0000 |
commit | 83499617458a93217e8f1ed5194c16f2b3bedc40 (patch) | |
tree | 3337cac977a844506cc7ac03fa046a65ec130c9b /pym/portage/glsa.py | |
parent | Add a "prefix" keyword parameter to slot_dict_class() which controls the (diff) | |
download | portage-83499617458a93217e8f1ed5194c16f2b3bedc40.tar.gz portage-83499617458a93217e8f1ed5194c16f2b3bedc40.tar.bz2 portage-83499617458a93217e8f1ed5194c16f2b3bedc40.zip |
Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators..
svn path=/main/trunk/; revision=10870
Diffstat (limited to 'pym/portage/glsa.py')
-rw-r--r-- | pym/portage/glsa.py | 6 |
1 files changed, 3 insertions, 3 deletions
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") |