summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 18:26:05 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 18:26:05 +0000
commite9ab502d9806a227ebcc967e46718435e64a96bc (patch)
treea2ed28ba76e80b4b8b2aa3ed4f1e52b5cc674e6c
parent6a10ae51ee1aa9cb675a6e653695e37f93237e3d (diff)
downloadportage-e9ab502d9806a227ebcc967e46718435e64a96bc.tar.gz
portage-e9ab502d9806a227ebcc967e46718435e64a96bc.tar.bz2
portage-e9ab502d9806a227ebcc967e46718435e64a96bc.zip
Fix code from r15278 for python3 unicode compatibility. (trunk r15280)
svn path=/main/branches/2.1.7/; revision=15519
-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 56694a348..990c6e020 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3434,8 +3434,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