In _run_pkg_pretend(), write ebuild bytes from tbz2.getfile() in binary mode
authorZac Medico <zmedico@gentoo.org>
Wed, 7 Apr 2010 20:24:30 +0000 (13:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 7 Apr 2010 20:24:30 +0000 (13:24 -0700)
for python3 compatibility.

pym/_emerge/Scheduler.py

index b80fa900715a277d9137954bd70b148a120a60bb..7a0b95a9566ee7258545ad23bc461bb4f519a0f4 100644 (file)
@@ -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()