aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/config.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-03 15:13:01 -0400
committerGitHub <noreply@github.com>2020-07-03 15:13:01 -0400
commit990237c64404876791dc5985e7cfd260852dac0e (patch)
treeeb721c8957ee48c5149af6742a27a449fb618027 /setuptools/config.py
parenta877dab0bddaeb5503d871794ca06f1c81d805b8 (diff)
parent5f151cbbcd6c65f7f48082bfaf36db3a55df936e (diff)
downloadexternal_python_setuptools-990237c64404876791dc5985e7cfd260852dac0e.tar.gz
external_python_setuptools-990237c64404876791dc5985e7cfd260852dac0e.tar.bz2
external_python_setuptools-990237c64404876791dc5985e7cfd260852dac0e.zip
Merge pull request #2199 from cool-RR/2020-06-11-raise-from
Fix exception causes all over the codebase
Diffstat (limited to 'setuptools/config.py')
-rw-r--r--setuptools/config.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/config.py b/setuptools/config.py
index 45df2e3f..a8f8b6b0 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -42,9 +42,10 @@ class StaticModule:
for target in statement.targets
if isinstance(target, ast.Name) and target.id == attr
)
- except Exception:
+ except Exception as e:
raise AttributeError(
- "{self.name} has no attribute {attr}".format(**locals()))
+ "{self.name} has no attribute {attr}".format(**locals())
+ ) from e
@contextlib.contextmanager