From 1fb1244b68784e3ae9e3c2541dcdf40a84ca8c60 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 8 Aug 2013 12:36:26 +0430 Subject: [PATCH] remove unlogical operation catching --- jedi/evaluate_representation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jedi/evaluate_representation.py b/jedi/evaluate_representation.py index 31f8ba67..71f960b0 100644 --- a/jedi/evaluate_representation.py +++ b/jedi/evaluate_representation.py @@ -447,11 +447,9 @@ class Execution(Executable): elif isinstance(self.base, Generator): return self.base.iter_content() else: - # Don't do this with exceptions, as usual, because some deeper - # exceptions could be catched - and I wouldn't know what happened. try: - self.base.returns - except (AttributeError, DecoratorNotFound): + self.base.returns # Test if it is a function + except AttributeError: if hasattr(self.base, 'execute_subscope_by_name'): try: stmts = self.base.execute_subscope_by_name('__call__',