From 74d1ad697e82601bf8aa44b0d24121017071e655 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 22 Sep 2009 21:26:20 +0000 Subject: Replace dict.keys() usage with __iter__(), since it behaves identically in both python 2.x and 3.x. svn path=/main/trunk/; revision=14384 --- pym/portage/elog/__init__.py | 2 +- pym/portage/elog/mod_mail.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/portage/elog') diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py index 53c0a85f7..15e8c9bce 100644 --- a/pym/portage/elog/__init__.py +++ b/pym/portage/elog/__init__.py @@ -100,7 +100,7 @@ def elog_process(cpv, mysettings, phasefilter=None): else: all_logentries[cpv] = ebuild_logentries - for key in list(_preserve_logentries.keys()): + for key in list(_preserve_logentries): if key in all_logentries: all_logentries[key] = _merge_logentries(_preserve_logentries[key], all_logentries[key]) else: diff --git a/pym/portage/elog/mod_mail.py b/pym/portage/elog/mod_mail.py index ac96f3b20..96e45ba21 100644 --- a/pym/portage/elog/mod_mail.py +++ b/pym/portage/elog/mod_mail.py @@ -22,14 +22,14 @@ def process(mysettings, key, logentries, fulltext): # look at the phases listed in our logentries to figure out what action was performed action = _("merged") - for phase in logentries.keys(): + for phase in logentries: # if we found a *rm phase assume that the package was unmerged if phase in ["postrm", "prerm"]: action = _("unmerged") # if we think that the package was unmerged, make sure there was no unexpected # phase recorded to avoid misinformation if action == _("unmerged"): - for phase in logentries.keys(): + for phase in logentries: if phase not in ["postrm", "prerm", "other"]: action = _("unknown") -- cgit v1.2.3-1-g7c22