[issue101] Crash with smart search with none descriptions
Ben at Labix Tracker
tracker at labix.org
Thu Jan 26 16:49:09 PST 2006
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()):
----------
messages: 295
nosy: Ben77
priority: bug
project: smart
status: unread
title: Crash with smart search with none descriptions
_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue101>
_______________________________________
More information about the Smart
mailing list