[Yum-devel] [PATCH] Stupid fix for old code, doesn't like bool return from sql py funcs. BZ#522032

Seth Vidal skvidal at fedoraproject.org
Fri Sep 11 12:08:13 UTC 2009



On Fri, 11 Sep 2009, Tim Lauridsen wrote:

> On 09/10/2009 09:07 PM, Seth Vidal wrote:
>> 
>> 
>> On Thu, 10 Sep 2009, James Antill wrote:
>> 
>>> ---
>>> yum/sqlitesack.py | 8 +++++---
>>> 1 files changed, 5 insertions(+), 3 deletions(-)
>>> 
>>> diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
>>> index b6c14c5..aafa717 100644
>>> --- a/yum/sqlitesack.py
>>> +++ b/yum/sqlitesack.py
>>> @@ -929,15 +929,17 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
>>> if file_glob:
>>> name_re = re.compile(fnmatch.translate(name))
>>> def filelist_globber(sql_dirname, sql_filenames):
>>> + # Note: Can't return bool, because python-2.4/sqlite don't
>>> + # like it.
>>> files = sql_filenames.split('/')
>>> if not file_glob:
>>> - return filename in files
>>> + return int(filename in files)
>>> 
>>> fns = map(lambda f: '%s/%s' % (sql_dirname, f), files)
>>> for match in fns:
>>> if name_re.match(match):
>>> - return True
>>> - return False
>>> + return 1
>>> + return 0
>>> 
>> 
>> you mean people still use python 2.4? That's crazy! :)
>> 
>> 
>> ACK
>> 
>
> Just bumping the requirement to python 2.5 is much easier :) :)
>

Sadly it's hard for rhel5 :(

-sv



More information about the Yum-devel mailing list