This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author draghuram
Recipients anthonybaxter, draghuram, melicertes, rhettinger
Date 2008-02-01.16:32:07
SpamBayes Score 0.055302933
Marked as misclassified No
Message-id <1201883529.27.0.612872601205.issue974019@psf.upfronthosting.co.za>
In-reply-to
Content
With the latest python, get() itself fails with boolean value default. I
tried with this script:

-------------
from ConfigParser import ConfigParser
cfg = ConfigParser({'var':True})
cfg.add_section('test_section')
print cfg.getboolean('test_section', 'var')
-------------

and it results in

-------------
Traceback (most recent call last):
  File "t.py", line 4, in <module>
    print cfg.getboolean('test_section', 'var')
  File "/localhome/raghu/localwork/cpython/trunk/Lib/ConfigParser.py",
line 349, in getboolean
    v = self.get(section, option)
  File "/localhome/raghu/localwork/cpython/trunk/Lib/ConfigParser.py",
line 545, in get
    return self._interpolate(section, option, value, d)
  File "/localhome/raghu/localwork/cpython/trunk/Lib/ConfigParser.py",
line 585, in _interpolate
    if "%(" in value:
TypeError: argument of type 'bool' is not iterable
-------------

I doubt if it is worth fixing the OP's issue considering that
_interpolate is assuming the value to be string. Can I close this issue?
History
Date User Action Args
2008-02-01 16:32:09draghuramsetspambayes_score: 0.0553029 -> 0.055302933
recipients: + draghuram, anthonybaxter, rhettinger, melicertes
2008-02-01 16:32:09draghuramsetspambayes_score: 0.0553029 -> 0.0553029
messageid: <1201883529.27.0.612872601205.issue974019@psf.upfronthosting.co.za>
2008-02-01 16:32:08draghuramlinkissue974019 messages
2008-02-01 16:32:07draghuramcreate