[New-bugs-announce] [issue11324] ConfigParser(interpolation=None) doesn't work

Tobias Brink report at bugs.python.org
Fri Feb 25 21:37:08 CET 2011

New submission from Tobias Brink <tobias.brink at gmail.com>:

The docs for Python 3.2 say that p = configparser.ConfigParser(interpolation=None) disables interpolation.  Instead it gives this traceback when calling p.read():

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/configparser.py", line 688, in read
    self._read(fp, filename)
  File "/usr/lib/python3.2/configparser.py", line 1081, in _read
  File "/usr/lib/python3.2/configparser.py", line 1091, in _join_multiline_values
    options[name] = self._interpolation.before_read(self,
AttributeError: 'NoneType' object has no attribute 'before_read'

The attached patch should fix it.

components: Library (Lib)
files: configparser_interpolation.patch
keywords: patch
messages: 129421
nosy: tbrink
priority: normal
severity: normal
status: open
title: ConfigParser(interpolation=None) doesn't work
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20895/configparser_interpolation.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list