summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-30 10:41:23 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-30 10:41:23 +0000
commit7adee7505f157e608a2b74cb5d5a52341593a0da (patch)
tree805bde1e37adeb9db25e4b5ea3e28263994fb511 /pym
parent6b1f0cf0ce755aa44c75539494d1b627ca9da425 (diff)
downloadportage-7adee7505f157e608a2b74cb5d5a52341593a0da.tar.gz
portage-7adee7505f157e608a2b74cb5d5a52341593a0da.tar.bz2
portage-7adee7505f157e608a2b74cb5d5a52341593a0da.zip
Fix code from r15278 for python3 unicode compatibility.
svn path=/main/trunk/; revision=15280
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 33967e21b..16f600683 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -4593,8 +4593,9 @@ def tar_contents(contents, root, tar, protect=None, onProgress=None):
# Create an empty file as a place holder in order to avoid
# potential collision-protect issues.
f = tempfile.TemporaryFile()
- f.write("# empty file because --include-config=n " + \
- "when `quickpkg` was used\n")
+ f.write(_unicode_encode(
+ "# empty file because --include-config=n " + \
+ "when `quickpkg` was used\n"))
f.flush()
f.seek(0)
tarinfo.size = os.fstat(f.fileno()).st_size