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/configparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/configparser.py') diff --git a/Lib/configparser.py b/Lib/configparser.py index 230ab2b017..ea971f3933 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -1138,7 +1138,7 @@ class RawConfigParser(MutableMapping): sectiondict = self._sections[section] except KeyError: if section != self.default_section: - raise NoSectionError(section) + raise NoSectionError(section) from None # Update with the entry specific variables vardict = {} if vars: -- cgit v1.2.1