[yum-git] 2 commits - output.py yum/sqlitesack.py yum/sqlutils.py
James Antill
james at linux.duke.edu
Thu Mar 6 19:08:12 UTC 2008
output.py | 2 ++
yum/sqlitesack.py | 16 +++++++++-------
yum/sqlutils.py | 4 +++-
3 files changed, 14 insertions(+), 8 deletions(-)
New commits:
commit 0457fa607051018daf66358ae0794e39481041bc
Author: James Antill <james at and.org>
Date: Thu Mar 6 14:07:11 2008 -0500
Don't hide unicode errors on the prompt
diff --git a/output.py b/output.py
index 06bf1d6..21de067 100644
--- a/output.py
+++ b/output.py
@@ -337,6 +337,8 @@ class YumOutput:
while True:
try:
choice = raw_input(_('Is this ok [y/N]: '))
+ except UnicodeEncodeError:
+ raise
except:
choice = ''
choice = choice.lower()
commit a1f8c8416a16ff05b6de94a80934f619fc2ad3d9
Author: James Antill <james at and.org>
Date: Thu Mar 6 13:50:51 2008 -0500
python-sqlite-1.x compatability fixes
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index a1f4ba9..4c65a8c 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -1020,15 +1020,17 @@ where name %(op)s '%(q)s'
or name || '-' || epoch || ':' || version || '-' || release || '.' || arch %(op)s '%(q)s'
"""
-# This is roughly the same as above, and used by _buildPkgObjList()
+# This is roughly the same as above, and used by _buildPkgObjList().
+# Use " to quote because we using ? ... and sqlutils.QmarkToPyformat gets
+# confused.
_FULL_PARSE_QUERY_BEG = """
SELECT pkgId,pkgKey,name,epoch,version,release,arch,
- name || '.' || arch AS sql_nameArch,
- name || '-' || version || '-' || release || '.' || arch AS sql_nameVerRelArch,
- name || '-' || version AS sql_nameVer,
- name || '-' || version || '-' || release AS sql_nameVerRel,
- epoch || ':' || name || '-' || version || '-' || release || '.' || arch AS sql_envra,
- name || '-' || epoch || ':' || version || '-' || release || '.' || arch AS sql_nevra
+ name || "." || arch AS sql_nameArch,
+ name || "-" || version || "-" || release || "." || arch AS sql_nameVerRelArch,
+ name || "-" || version AS sql_nameVer,
+ name || "-" || version || "-" || release AS sql_nameVerRel,
+ epoch || ":" || name || "-" || version || "-" || release || "." || arch AS sql_envra,
+ name || "-" || epoch || ":" || version || "-" || release || "." || arch AS sql_nevra
FROM packages
WHERE
"""
diff --git a/yum/sqlutils.py b/yum/sqlutils.py
index 013fdae..58b63ab 100644
--- a/yum/sqlutils.py
+++ b/yum/sqlutils.py
@@ -143,7 +143,9 @@ def executeSQLPyFormat(cursor, query, params=None):
"""
if params is None:
return cursor.execute(query)
-
+
+ # Leading whitespace confuses QmarkToPyformat()
+ query = query.strip()
(q, p) = QmarkToPyformat(query, params)
return cursor.execute(q, p)
More information about the Yum-cvs-commits
mailing list