From 1aa422fe8f056fd0000da45a67d875adc75cf034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Thu, 28 Apr 2011 17:03:45 +0200 Subject: Closes #11324: ConfigParser(interpolation=None) doesn't work. Initial patches by Tobias Brink. Thanks! --- Lib/configparser.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Lib/configparser.py') diff --git a/Lib/configparser.py b/Lib/configparser.py index 0ecff701ad..82b6f03061 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -623,11 +623,12 @@ class RawConfigParser(MutableMapping): self._strict = strict self._allow_no_value = allow_no_value self._empty_lines_in_values = empty_lines_in_values - if interpolation is _UNSET: - self._interpolation = self._DEFAULT_INTERPOLATION - else: - self._interpolation = interpolation self.default_section=default_section + self._interpolation = interpolation + if self._interpolation is _UNSET: + self._interpolation = self._DEFAULT_INTERPOLATION + if self._interpolation is None: + self._interpolation = Interpolation() def defaults(self): return self._defaults -- cgit v1.2.1