summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-04 21:14:58 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-04 21:14:58 +0000
commit119d1d026b0b9b4a6d8be711655300004f84b91b (patch)
treecd3fefd8a193e365d4379e1a55b860b4d7518f1d /pym
parentd95a0f4df52eb025a181df90faf07d67de45d761 (diff)
downloadportage-119d1d026b0b9b4a6d8be711655300004f84b91b.tar.gz
portage-119d1d026b0b9b4a6d8be711655300004f84b91b.tar.bz2
portage-119d1d026b0b9b4a6d8be711655300004f84b91b.zip
Fix tar_contents() to open files in binary mode for py3k compatibility.
svn path=/main/trunk/; revision=13908
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py2
1 files changed, 1 insertions, 1 deletions
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: