bug: smart search fails on empty info

Darko Veberic darko.veberic at p-ng.si
Wed Mar 29 08:12:23 PST 2006


hi,

well, after reading the python tutorials, this solves the problem:
query.py, line 281

                 if hasdescription:
                     for pattern in hasdescription:
                         descr = info.getDescription()
                         if descr:
                             if pattern.search(descr):
                                 newpackages[pkg] = True

Darko Veberic wrote:
> hi,
> 
> maybe this has been already discussed but i have not seen a working 
> smart search on any of the fc distributions. i guess the search fails as 
> soon as there is an empty info in some rpm:
> 
> ====smart-0.41-26.rhfc5.at==============================================
> 
> # smart search openafs
> Loading cache...
> Updating cache...               ######################################## 
> [100%]
> 
> Traceback (most recent call last):
>   File "/usr/bin/smart", line 194, in ?
>     main(sys.argv[1:])
>   File "/usr/bin/smart", line 167, in main
>     exitcode = iface.run(opts.command, opts.argv)
>   File "/usr/lib64/python2.4/site-packages/smart/interface.py", line 53, 
> in run
>     result = _command.main(self._ctrl, opts)
>   File "/usr/lib64/python2.4/site-packages/smart/commands/query.py", 
> line 283, in main
>     if pattern.search(info.getDescription()):
> TypeError: expected string or buffer
> 
> ========================================================================

^C,
-- 
darko.

Dr. Darko Veberic ------------------
Laboratory for Astroparticle Physics
University of Nova Gorica
Vipavska 13, POB 301
SI-5001 Nova Gorica, Slovenia
mobile: +386 41 860 861
  phone: +386 5 3315 255
    fax: +386 5 3315 240
------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: darko.veberic.vcf
Type: text/x-vcard
Size: 383 bytes
Desc: not available
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20060329/676a667c/attachment-0003.vcf>


More information about the Smart mailing list