From: Zac Medico Date: Fri, 25 Nov 2011 19:35:32 +0000 (-0800) Subject: elog/mod_syslog: fix 1 char msgs, bug #390965 X-Git-Tag: v2.2.0_alpha78~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9e6364fe049b5cc59e8cb54f683bbd11d45a7504;p=portage.git elog/mod_syslog: fix 1 char msgs, bug #390965 --- diff --git a/pym/portage/elog/mod_syslog.py b/pym/portage/elog/mod_syslog.py index 64558410d..c8bf44172 100644 --- a/pym/portage/elog/mod_syslog.py +++ b/pym/portage/elog/mod_syslog.py @@ -7,6 +7,9 @@ import syslog from portage.const import EBUILD_PHASES from portage import _encodings +if sys.hexversion >= 0x3000000: + basestring = str + _pri = { "INFO" : syslog.LOG_INFO, "WARN" : syslog.LOG_WARNING, @@ -21,6 +24,8 @@ def process(mysettings, key, logentries, fulltext): if not phase in logentries: continue for msgtype,msgcontent in logentries[phase]: + if isinstance(msgcontent, basestring): + msgcontent = [msgcontent] for line in msgcontent: line = "%s: %s: %s" % (key, phase, line) if sys.hexversion < 0x3000000 and not isinstance(line, bytes):