From: Zac Medico Date: Thu, 6 Aug 2009 21:57:31 +0000 (-0000) Subject: Fix filter_loglevels() and filter_phases() to work with unicode. X-Git-Tag: v2.2_rc37~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a2353c4af5955173aa1324cacfdb7beb91f492bd;p=portage.git Fix filter_loglevels() and filter_phases() to work with unicode. svn path=/main/trunk/; revision=13940 --- diff --git a/pym/portage/elog/filtering.py b/pym/portage/elog/filtering.py index d33d31237..d4d405347 100644 --- a/pym/portage/elog/filtering.py +++ b/pym/portage/elog/filtering.py @@ -8,7 +8,7 @@ from portage.const import EBUILD_PHASES def filter_loglevels(logentries, loglevels): # remove unwanted entries from all logentries rValue = {} - loglevels = map(str.upper, loglevels) + loglevels = [x.upper() for x in loglevels] for phase in logentries: for msgtype, msgcontent in logentries[phase]: if msgtype.upper() in loglevels or "*" in loglevels: @@ -20,7 +20,7 @@ def filter_loglevels(logentries, loglevels): def filter_phases(logentries, phases): rValue1 = {} rValue2 = {} - phases = map(str.lower, phases) + phases = [x.lower() for x in phases] for phase in logentries: if phase in phases: rValue1[phase] = logentries[phase]