[Yum-devel] [PATCH 1/2] Use the correct test to see if the INSERT worked, needed for RHEL-5 sqlite.

tim.lauridsen at gmail.com tim.lauridsen at gmail.com
Fri Sep 23 17:10:54 UTC 2011


On Tue, Sep 20, 2011 at 5:58 PM, James Antill <james at and.org> wrote:
> ---
>  yum/history.py |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/yum/history.py b/yum/history.py
> index a9b12cf..bbd9bf2 100644
> --- a/yum/history.py
> +++ b/yum/history.py
> @@ -1296,10 +1296,8 @@ class YumHistory:
>         sql = """INSERT INTO pkg_%(db)sdb (pkgtupid, %(db)sdb_key, %(db)sdb_val)
>                         VALUES (?, ?, ?)""" % {'db' : db}
>         executeSQL(cur, sql, (pid, attr, to_unicode(val)))
> -        for row in cur:
> -            return row[0]
>
> -        return None
> +        return cur.lastrowid
>
>     def _save_rpmdb_key(self, pkg, attr, val):
>         return self._save_anydb_key(pkg, "rpm", attr, val)
> --
> 1.7.6.2
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>

ACK


More information about the Yum-devel mailing list