[Yum-devel] [PATCH] Fix: Unicode unequal comparison failed to convert both arguments to Unicode
Seth Vidal
skvidal at fedoraproject.org
Thu Oct 29 04:42:00 UTC 2009
On Wed, 28 Oct 2009, James Antill wrote:
> ---
> yum/packages.py | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/yum/packages.py b/yum/packages.py
> index 709e73e..6941373 100644
> --- a/yum/packages.py
> +++ b/yum/packages.py
> @@ -410,7 +410,10 @@ class RpmBase(object):
> # find the named entry in pkgobj, do the comparsion
> result = []
> for (n, f, (e, v, r)) in self.returnPrco(prcotype):
> - if reqn != n:
> + if isinstance(reqn, unicode) == isinstance(n, unicode):
> + if reqn != n: # stupid python...
> + continue
> + elif misc.to_utf8(reqn) != misc.to_utf8(n):
> continue
>
> if f == '=':
> --
> 1.6.2.5
ACK - grumble at python
-sv
More information about the Yum-devel
mailing list