From 9e6364fe049b5cc59e8cb54f683bbd11d45a7504 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 25 Nov 2011 11:35:32 -0800 Subject: elog/mod_syslog: fix 1 char msgs, bug #390965 --- pym/portage/elog/mod_syslog.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pym/portage/elog') 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): -- cgit v1.2.3-1-g7c22