summaryrefslogtreecommitdiffstats
path: root/pym/portage/elog
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-11-25 11:35:32 -0800
committerZac Medico <zmedico@gentoo.org>2011-11-25 11:35:32 -0800
commit9e6364fe049b5cc59e8cb54f683bbd11d45a7504 (patch)
tree40982d695fd75a7c4dec1c13fa105f5530989a36 /pym/portage/elog
parentabfc6238532ea237bfc36a73de73969d37542de7 (diff)
downloadportage-9e6364fe049b5cc59e8cb54f683bbd11d45a7504.tar.gz
portage-9e6364fe049b5cc59e8cb54f683bbd11d45a7504.tar.bz2
portage-9e6364fe049b5cc59e8cb54f683bbd11d45a7504.zip
elog/mod_syslog: fix 1 char msgs, bug #390965
Diffstat (limited to 'pym/portage/elog')
-rw-r--r--pym/portage/elog/mod_syslog.py5
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):