From: Zac Medico Date: Tue, 4 Aug 2009 21:14:58 +0000 (-0000) Subject: Fix tar_contents() to open files in binary mode for py3k compatibility. X-Git-Tag: v2.2_rc36~9 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=119d1d026b0b9b4a6d8be711655300004f84b91b;p=portage.git Fix tar_contents() to open files in binary mode for py3k compatibility. svn path=/main/trunk/; revision=13908 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 72c829271..f99fb69da 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -4147,7 +4147,7 @@ def tar_contents(contents, root, tar, protect=None, onProgress=None): tarinfo.size = 0 tar.addfile(tarinfo) else: - f = open(path) + f = open(path, 'rb') try: tar.addfile(tarinfo, f) finally: