diff options
-rw-r--r-- | pym/_emerge/EbuildMetadataPhase.py | 4 | ||||
-rw-r--r-- | pym/portage/__init__.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py index 64f54d49e..8e488d306 100644 --- a/pym/_emerge/EbuildMetadataPhase.py +++ b/pym/_emerge/EbuildMetadataPhase.py @@ -123,7 +123,9 @@ class EbuildMetadataPhase(SubProcess): def _set_returncode(self, wait_retval): SubProcess._set_returncode(self, wait_retval) if self.returncode == os.EX_OK: - metadata_lines = "".join(self._raw_metadata).splitlines() + metadata_lines = u''.join(unicode(chunk, + encoding='utf_8', errors='replace') + for chunk in self._raw_metadata).splitlines() if len(portage.auxdbkeys) != len(metadata_lines): # Don't trust bash's returncode if the # number of lines is incorrect. diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index e601180ac..1d5a2dc02 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -6070,7 +6070,8 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, if not mybytes[-1]: break os.close(pr) - mybytes = "".join(mybytes) + mybytes = u''.join(unicode(chunk, + encoding='utf_8', errors='replace') for chunk in mybytes) global auxdbkeys for k, v in izip(auxdbkeys, mybytes.splitlines()): dbkey[k] = v |