[Yum-devel] [PATCH] Fix unicide with rpmdb problems being logged in history, BZ 608956
James Antill
james at and.org
Mon Aug 9 15:15:18 UTC 2010
---
yum/history.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/yum/history.py b/yum/history.py
index 6a485d8..6bc767a 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -425,12 +425,15 @@ class YumHistory:
cur = self._get_cursor()
if cur is None or not self._update_db_file_2():
return None
+ # str(problem) doesn't work if problem contains unicode(),
+ # unicode(problem) doesn't work in python 2.4.x ... *sigh*.
+ uproblem = to_unicode(problem.__str__())
res = executeSQL(cur,
"""INSERT INTO trans_rpmdb_problems
(tid, problem, msg)
VALUES (?, ?, ?)""", (self._tid,
problem.problem,
- to_unicode(str(problem))))
+ uproblem))
rpid = cur.lastrowid
if not rpid:
--
1.7.2
More information about the Yum-devel
mailing list