[Yum-devel] [PATCH 1/2] Convert rpm/yumdb values to unicode, or python/sqlite will die. BZ 730365.

James Antill james at and.org
Fri Aug 19 18:01:04 UTC 2011


---
 yum/history.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yum/history.py b/yum/history.py
index c91c33a..6449708 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -1295,7 +1295,7 @@ class YumHistory:
 
         sql = """INSERT INTO pkg_%(db)sdb (pkgtupid, %(db)sdb_key, %(db)sdb_val)
                         VALUES (?, ?, ?)""" % {'db' : db}
-        executeSQL(cur, sql, (pid, attr, val))
+        executeSQL(cur, sql, (pid, attr, to_unicode(val)))
         for row in cur:
             return row[0]
 
-- 
1.7.6



More information about the Yum-devel mailing list