summaryrefslogtreecommitdiff
path: root/astroid/inference.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-07-31 09:47:23 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-07-31 09:47:23 +0200
commitf0044dd8b6d8d3d8f2e0b0291c105ac0dda38664 (patch)
tree2bf0f41ec8c93671b2e303b81db55b625911150f /astroid/inference.py
parent2894a1a392ba564ad05ce695cfc35b11340049fc (diff)
downloadastroid-git-f0044dd8b6d8d3d8f2e0b0291c105ac0dda38664.tar.gz
infer_call_result can raise InferenceError so make sure to handle that for the call sites where it is used
infer_call_result started recently to raise InferenceError for objects for which it could not find any returns. Previously it was silently raising a StopIteration, which was especially leaking when calling builtin methods. Since it is after all an inference method, it is expected that it could raise an InferenceError rather than returning nothing. Close PyCQA/pylint#2350
Diffstat (limited to 'astroid/inference.py')
-rw-r--r--astroid/inference.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/astroid/inference.py b/astroid/inference.py
index ec3a370e..b61427a0 100644
--- a/astroid/inference.py
+++ b/astroid/inference.py
@@ -219,7 +219,6 @@ def infer_call(self, context=None):
context=callcontext,
)
except exceptions.InferenceError:
- ## XXX log error ?
continue
return dict(node=self, context=context)
nodes.Call._infer = infer_call