From 119d1d026b0b9b4a6d8be711655300004f84b91b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 4 Aug 2009 21:14:58 +0000 Subject: [PATCH] Fix tar_contents() to open files in binary mode for py3k compatibility. svn path=/main/trunk/; revision=13908 --- pym/portage/dbapi/vartree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.26.2