summaryrefslogtreecommitdiffstats
path: root/pym/portage.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-09 02:51:58 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-09 02:51:58 +0000
commit29c23959715aaa9d02fff96c2bb57a51196ee18b (patch)
tree8853a614571c06003faf64c45d9a131ae9ca4a41 /pym/portage.py
parent1e5353ab3692aa2dc9c62157a53083e4257d2634 (diff)
downloadportage-29c23959715aaa9d02fff96c2bb57a51196ee18b.tar.gz
portage-29c23959715aaa9d02fff96c2bb57a51196ee18b.tar.bz2
portage-29c23959715aaa9d02fff96c2bb57a51196ee18b.zip
Split PORTAGE_ELOG_CLASSES outside the loop for better efficiency.
svn path=/main/trunk/; revision=5495
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 4fdafbd0d..68df71e47 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -469,10 +469,11 @@ def elog_process(cpv, mysettings):
# exploit listdir() file order so we process log entries in chronological order
mylogfiles.reverse()
mylogentries = {}
+ my_elog_classes = set(mysettings.get("PORTAGE_ELOG_CLASSES", "").split())
for f in mylogfiles:
msgfunction, msgtype = f.split(".")
- if not msgtype.upper() in mysettings["PORTAGE_ELOG_CLASSES"].split() \
- and not msgtype.lower() in mysettings["PORTAGE_ELOG_CLASSES"].split():
+ if msgtype.upper() not in my_elog_classes \
+ and msgtype.lower() not in my_elog_classes:
continue
if msgfunction not in portage_const.EBUILD_PHASES:
writemsg("!!! can't process invalid log file: %s\n" % f,