summaryrefslogtreecommitdiffstats
path: root/Lib/configparser.py
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2011-04-28 15:03:45 (GMT)
committerŁukasz Langa <lukasz@langa.pl>2011-04-28 15:03:45 (GMT)
commit1aa422fe8f056fd0000da45a67d875adc75cf034 (patch)
treec0682c6861b6630d6daa86a951852aee3d6e1c09 /Lib/configparser.py
parentf53111339779011df6337a69fcd119644f0500b4 (diff)
downloadcpython-1aa422fe8f056fd0000da45a67d875adc75cf034.zip
cpython-1aa422fe8f056fd0000da45a67d875adc75cf034.tar.gz
cpython-1aa422fe8f056fd0000da45a67d875adc75cf034.tar.bz2
Closes #11324: ConfigParser(interpolation=None) doesn't work.
Initial patches by Tobias Brink. Thanks!
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r--Lib/configparser.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py
index 0ecff70..82b6f03 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