[yum-commits] sqlitecachec.py
skvidal at osuosl.org
skvidal at osuosl.org
Tue Aug 18 15:29:27 UTC 2009
sqlitecachec.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit e6f90ba4c9414c03f3a04f2cdfcd24674a38c47a
Author: Mike Bonnet <mikeb at redhat.com>
Date: Tue Aug 18 11:27:00 2009 -0400
configure sqlite to return utf-8-encoded strs instead of unicode objects
sqlite by default returns all text as unicode objects, and this causes a number of problems when merging repos which
contain utf-8 characters in Provides or Requires (as the current F11/F12 repos do). For a testcase, try merging 2 F12
repos, and you should see it fail with a UnicodeDecodeError in packages.py:_dump_pco(). This patch instructs sqlite to
return all text as utf-8-encoded strs, which avoids these encoding issues.
diff --git a/sqlitecachec.py b/sqlitecachec.py
index 7ed5056..8b0ca08 100644
--- a/sqlitecachec.py
+++ b/sqlitecachec.py
@@ -29,6 +29,7 @@ class RepodataParserSqlite:
if not filename:
return None
con = sqlite.connect(filename)
+ con.text_factory = str
if sqlite.version_info[0] > 1:
con.row_factory = sqlite.Row
cur = con.cursor()
More information about the Yum-commits
mailing list