This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author donlorenzo
Recipients donlorenzo
Date 2008-03-07.10:49:55
SpamBayes Score 0.06331771
Marked as misclassified No
Message-id <1204886997.65.0.75088007868.issue2250@psf.upfronthosting.co.za>
In-reply-to
Content
in line 130 rlcompleter calls eval on the first part (before the last
dot) of the input text.
if that part is not valid it will raise an exception which is likely to
crash a calling application. 

example 1:
==========
import rlcompleter
rlcompleter.Completer().complete("foo.", 0) -> raises NameError

example 2:
==========
import rlcompleter
foo = 5
rlcompleter.Completer().complete("foo.bar.", 0) -> raises AttributeError

the patch puts the eval call in a try-except block and catches Name- and
AttributeErrors and returns an empty list (the behavior when no matches
are found).
History
Date User Action Args
2008-03-07 10:49:57donlorenzosetspambayes_score: 0.0633177 -> 0.06331771
recipients: + donlorenzo
2008-03-07 10:49:57donlorenzosetspambayes_score: 0.0633177 -> 0.0633177
messageid: <1204886997.65.0.75088007868.issue2250@psf.upfronthosting.co.za>
2008-03-07 10:49:56donlorenzolinkissue2250 messages
2008-03-07 10:49:55donlorenzocreate