diff options
Diffstat (limited to 'Lib/rlcompleter.py')
-rw-r--r-- | Lib/rlcompleter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index c605c7d254..10a53dc9cb 100644 --- a/Lib/rlcompleter.py +++ b/Lib/rlcompleter.py @@ -121,7 +121,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__') |