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
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:
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):