summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-21 00:18:45 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-21 00:18:45 +0000
commitba97688a141e8a6de4139d81268758a7a2355dd0 (patch)
tree1f4fc74826761474d63926f6a3822ceffe6d73e0
parenta725446766ae9e4b34f34c3f19e50c4df89b7e41 (diff)
downloadportage-ba97688a141e8a6de4139d81268758a7a2355dd0.tar.gz
portage-ba97688a141e8a6de4139d81268758a7a2355dd0.tar.bz2
portage-ba97688a141e8a6de4139d81268758a7a2355dd0.zip
For python-3.0 compatibility, open files in binary mode inside
SpawnProcess._start(). svn path=/main/trunk/; revision=12666
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 7505deda0..80f0372f8 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2274,19 +2274,19 @@ class SpawnProcess(SubProcess):
else:
fd_pipes[0] = fd_pipes_orig[0]
- files.process = os.fdopen(master_fd, 'r')
+ files.process = os.fdopen(master_fd, 'rb')
if logfile is not None:
fd_pipes[1] = slave_fd
fd_pipes[2] = slave_fd
- files.log = open(logfile, "a")
+ files.log = open(logfile, mode='ab')
portage.util.apply_secpass_permissions(logfile,
uid=portage.portage_uid, gid=portage.portage_gid,
mode=0660)
if not self.background:
- files.stdout = os.fdopen(os.dup(fd_pipes_orig[1]), 'w')
+ files.stdout = os.fdopen(os.dup(fd_pipes_orig[1]), 'wb')
output_handler = self._output_handler