From 29c23959715aaa9d02fff96c2bb57a51196ee18b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 9 Jan 2007 02:51:58 +0000 Subject: Split PORTAGE_ELOG_CLASSES outside the loop for better efficiency. svn path=/main/trunk/; revision=5495 --- pym/portage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pym/portage.py') 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, -- cgit v1.2.3-1-g7c22