mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
- #2250: Exceptions raised during evaluation of names in rlcompleter's
``Completer.complete()`` method are now caught and ignored.
This commit is contained in:
parent
ecbbd94e71
commit
627a666db0
3 changed files with 9 additions and 2 deletions
|
@ -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__')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue