[issue101] Crash with smart search with none descriptions

Jeff Johnson n3npq at mac.com
Fri Jan 27 06:55:38 PST 2006


On Jan 26, 2006, at 7:49 PM, Ben at Labix Tracker wrote:

>
> New submission from Ben <ben77 at aol.com>:
>
> Currently if I do any search with smart it crashes with this error:
> 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/lib/python2.4/site-packages/smart/interface.py", line  
> 53, in run
>     result = _command.main(self._ctrl, opts)
>   File "/usr/lib/python2.4/site-packages/smart/commands/query.py",  
> line 283, in main
>     if pattern.search(info.getDescription()):
> TypeError: expected string or buffer
>
> Apparently the fc4 dhcdbd package has an empty description that is  
> translated
> into a None in smart. Therefore any search crashes it. I don't know  
> if this is
> really a packaging error, but a quick fix would be a check before  
> calling
> pattern.search. Simply change line 238 to:
> if info.getDescription() and pattern.search(info.getDescription()):
>

There is something else wrong, since %description is a required/ 
mandatory field in all
*.rpm packages.

73 de Jeff




More information about the Smart mailing list