summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-11 06:03:50 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-11 06:03:50 +0000
commitd944cfbdc2392bb16a315f1d2d4fb59625cf04ad (patch)
treee54bf3ae2df4d30ec2519bac454e8599d69b182e /pym
parenta0cded292419b0834323233ae01975dbb25d0b83 (diff)
downloadportage-d944cfbdc2392bb16a315f1d2d4fb59625cf04ad.tar.gz
portage-d944cfbdc2392bb16a315f1d2d4fb59625cf04ad.tar.bz2
portage-d944cfbdc2392bb16a315f1d2d4fb59625cf04ad.zip
Inside portage.spawn(), open files for logfile handling in binary mode, for
compatibility with python-3.0. (trunk r12668) svn path=/main/branches/2.1.6/; revision=12930
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index a97834f48..c2699a8da 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3188,9 +3188,9 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, fakero
return mypids
if logfile:
- log_file = open(logfile, 'a')
- stdout_file = os.fdopen(os.dup(fd_pipes_orig[1]), 'w')
- master_file = os.fdopen(master_fd, 'r')
+ log_file = open(logfile, mode='ab')
+ stdout_file = os.fdopen(os.dup(fd_pipes_orig[1]), 'wb')
+ master_file = os.fdopen(master_fd, 'rb')
iwtd = [master_file]
owtd = []
ewtd = []