From d4ac468a24ad4b97e5cece063e537997400601a6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 7 Apr 2010 13:24:30 -0700 Subject: [PATCH] In _run_pkg_pretend(), write ebuild bytes from tbz2.getfile() in binary mode for python3 compatibility. --- pym/_emerge/Scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.26.2