diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-03 14:08:49 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-03 14:08:49 +0300 |
commit | 933bad8f80b564bdff4e4450ed1f412d22ef8206 (patch) | |
tree | 671716092b50bfcb5bf0a3622b7c270a1a3a7dd0 /astroid/inference.py | |
parent | 211f96f28c1300de1a89b67b527b1a7b499dcc0f (diff) | |
download | astroid-933bad8f80b564bdff4e4450ed1f412d22ef8206.tar.gz |
Fix a crash which occurred when inferring unary operands which yielded objects which weren't callable.
Diffstat (limited to 'astroid/inference.py')
-rw-r--r-- | astroid/inference.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/inference.py b/astroid/inference.py index 3f7ab5c..f7ab2be 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -373,6 +373,8 @@ def _infer_unaryop(self, context=None): try: meth = operand.getattr(meth, context=context)[0] inferred = next(meth.infer(context=context)) + if inferred is util.YES or not inferred.callable(): + continue call_results = inferred.infer_call_result(self, context=context) result = next(call_results, None) if result is None: |