diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-06-05 08:54:29 -0700 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-06-05 08:54:29 -0700 |
commit | b921573e760c05b3462bd5eeee095322e9b6b45c (patch) | |
tree | b177ac829772f593cd55dd3b4120b746c6ba28fd /astroid/inference.py | |
parent | 5834c5983b2cc453df773003bd174295e524c8c8 (diff) | |
download | astroid-git-b921573e760c05b3462bd5eeee095322e9b6b45c.tar.gz |
Don't propagate Uninferable objects when inferring BinOps
Close PyCQA/pylint#2059
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 3cf0b9f3..357e3091 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -541,6 +541,8 @@ def _invoke_binop_inference(instance, opnode, op, other, context, method_name): context.boundnode = instance method = methods[0] inferred = next(method.infer(context=context)) + if inferred is util.Uninferable: + raise exceptions.InferenceError return instance.infer_binary_op(opnode, op, other, context, inferred) |