Fix code from r15278 for python3 unicode compatibility. (trunk r15280)
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 18:26:05 +0000 (18:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 18:26:05 +0000 (18:26 -0000)
svn path=/main/branches/2.1.7/; revision=15519

pym/portage/dbapi/vartree.py

index 56694a34823f4a5b1b07773b58f81662612acdd9..990c6e020ceba0b4131a048816a0cbaef55093fd 100644 (file)
@@ -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