From 5affd23e6f42125998724787025080a24839266e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 5 Apr 2017 09:37:24 +0300 Subject: bpo-29762: More use "raise from None". (#569) This hides unwanted implementation details from tracebacks. --- Lib/sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/sysconfig.py') diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 9314e71a2f..ed0a34d662 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -147,7 +147,7 @@ def _subst_vars(s, local_vars): try: return s.format(**os.environ) except KeyError as var: - raise AttributeError('{%s}' % var) + raise AttributeError('{%s}' % var) from None def _extend_dict(target_dict, other_dict): target_keys = target_dict.keys() -- cgit v1.2.1