- #2250: Exceptions raised during evaluation of names in rlcompleter's

``Completer.complete()`` method are now caught and ignored.
This commit is contained in:
Georg Brandl 2008-05-11 21:03:42 +00:00
parent ecbbd94e71
commit 627a666db0
3 changed files with 9 additions and 2 deletions

View file

@ -127,7 +127,10 @@ class Completer:
if not m:
return []
expr, attr = m.group(1, 3)
object = eval(expr, self.namespace)
try:
object = eval(expr, self.namespace)
except Exception:
return []
words = dir(object)
if hasattr(object,'__class__'):
words.append('__class__')