Fix code from r15278 for python3 unicode compatibility.
authorZac Medico <zmedico@gentoo.org>
Sat, 30 Jan 2010 10:41:23 +0000 (10:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 30 Jan 2010 10:41:23 +0000 (10:41 -0000)
svn path=/main/trunk/; revision=15280

pym/portage/dbapi/vartree.py

index 33967e21b076ca53100becb33c20f27602bbbf00..16f600683652fb977ebaaf0e0935a091bc00a710 100644 (file)
@@ -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