[Yum-devel] [PATCH] when you .lower() a string you want to compare it to lowercase values, not uppercase ones.

James Antill james at fedoraproject.org
Fri Jul 15 15:33:25 UTC 2011


On Fri, 2011-07-15 at 11:18 -0400, Seth Vidal wrote:
> ---
>  yum/sqlitesack.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

 Wow ... that's pretty special, how has that lasted 3 years?
 ACK.

> diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
> index 8a6f6f3..19193ad 100644
> --- a/yum/sqlitesack.py
> +++ b/yum/sqlitesack.py
> @@ -406,7 +406,7 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
>          requires = []
>          for ob in cur:
>              pre = "0"
> -            if ob['pre'].lower() in ['TRUE', 1]:
> +            if ob['pre'].lower() in ['true', 1]:
>                  pre = "1"
>              prco_set = (_share_data(ob['name']), _share_data(ob['flags']),
>                          (_share_data(ob['epoch']),




More information about the Yum-devel mailing list