summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/BinpkgVerifier.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/BinpkgVerifier.py')
-rw-r--r--pym/_emerge/BinpkgVerifier.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/_emerge/BinpkgVerifier.py b/pym/_emerge/BinpkgVerifier.py
index 5827d0710..e0bd82203 100644
--- a/pym/_emerge/BinpkgVerifier.py
+++ b/pym/_emerge/BinpkgVerifier.py
@@ -12,6 +12,7 @@ except ImportError:
import sys
sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
import portage
+import codecs
import os
class BinpkgVerifier(AsynchronousTask):
__slots__ = ("logfile", "pkg",)
@@ -31,7 +32,8 @@ class BinpkgVerifier(AsynchronousTask):
stderr_orig = sys.stderr
log_file = None
if self.background and self.logfile is not None:
- log_file = open(self.logfile, 'a')
+ log_file = codecs.open(self.logfile, mode='a',
+ encoding='utf_8', errors='replace')
try:
if log_file is not None:
sys.stdout = log_file