From: Zac Medico Date: Wed, 7 Apr 2010 20:24:30 +0000 (-0700) Subject: In _run_pkg_pretend(), write ebuild bytes from tbz2.getfile() in binary mode X-Git-Tag: v2.2_rc68~663 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d4ac468a24ad4b97e5cece063e537997400601a6;p=portage.git In _run_pkg_pretend(), write ebuild bytes from tbz2.getfile() in binary mode for python3 compatibility. --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index b80fa9007..7a0b95a95 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -901,7 +901,7 @@ class Scheduler(PollScheduler): ebuild_file_contents = portage.xpak.tbz2(tbz2_file).getfile(ebuild_file_name) os.makedirs(os.path.join(tmpdir, x.category, x.pf)) ebuild_path = os.path.join(tmpdir, x.category, x.pf, ebuild_file_name) - file = open(ebuild_path, 'w') + file = open(ebuild_path, 'wb') file.write(ebuild_file_contents) file.close()