diff options
-rw-r--r-- | pym/portage/elog/mod_syslog.py | 5 |
1 files changed, 5 insertions, 0 deletions
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): |