summaryrefslogtreecommitdiff
path: root/astroid/inference.py
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2022-02-08 22:13:21 +0100
committerGitHub <noreply@github.com>2022-02-08 22:13:21 +0100
commitb5e3e71068c8eeb0ee5bb7770e6e26d207b7b92e (patch)
treec2ea8ccbec6605a160bd126a254c6360c229819a /astroid/inference.py
parent26c54d2a6be38b2d754f808f70b817fc8f4de6d1 (diff)
downloadastroid-git-b5e3e71068c8eeb0ee5bb7770e6e26d207b7b92e.tar.gz
Fix crash on inference of ``__dict__.items()`` of an imported module (#1367)
Diffstat (limited to 'astroid/inference.py')
-rw-r--r--astroid/inference.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/inference.py b/astroid/inference.py
index 74f04dd9..f1b50a87 100644
--- a/astroid/inference.py
+++ b/astroid/inference.py
@@ -317,6 +317,8 @@ def infer_attribute(self, context=None):
if not context:
context = InferenceContext()
+ else:
+ context = copy_context(context)
old_boundnode = context.boundnode
try: