From: Zac Medico Date: Sat, 21 Feb 2009 02:44:24 +0000 (-0000) Subject: Inside portage.spawn(), open files for logfile handling in binary mode, for X-Git-Tag: v2.2_rc24~143 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f55eb386c7fbd8b54d846782e834f071e3784073;p=portage.git Inside portage.spawn(), open files for logfile handling in binary mode, for compatibility with python-3.0. svn path=/main/trunk/; revision=12668 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3be6e651f..c18d43013 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3198,9 +3198,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 = []