summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/_MergeProcess.py4
-rw-r--r--pym/portage/dbapi/vartree.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 5caeef372..b5c45b36d 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -7,7 +7,7 @@ import traceback
import errno
import fcntl
import portage
-from portage import os, StringIO
+from portage import os, StringIO, _unicode_decode
import portage.elog.messages
from _emerge.PollConstants import PollConstants
from _emerge.SpawnProcess import SpawnProcess
@@ -32,7 +32,7 @@ class MergeProcess(SpawnProcess):
if e.errno not in (errno.EAGAIN, errno.EINTR):
raise
if output:
- lines = output.split('\n')
+ lines = _unicode_decode(output).split('\n')
if len(lines) == 1:
self._buf += lines[0]
else:
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 0e60af82a..d463c3a5e 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2802,7 +2802,7 @@ class dblink(object):
buffer.append(' '.join(fields))
buffer.append('\n')
if buffer:
- os.write(self._pipe, ''.join(buffer))
+ os.write(self._pipe, _unicode_encode(''.join(buffer)))
def treewalk(self, srcroot, destroot, inforoot, myebuild, cleanup=0,
mydbapi=None, prev_mtimes=None):