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 tlesher
Recipients tlesher
Date 2008-01-10.02:42:47
SpamBayes Score 0.39702117
Marked as misclassified No
Message-id <1199932970.3.0.196882211496.issue1781@psf.upfronthosting.co.za>
In-reply-to
Content
ConfigParser doesn't prevent "manually" adding a section named DEFAULT;
however, doing so creates a duplicate, inaccessible [DEFAULT] section in
the config file:
----
>>> import sys, ConfigParser
>>> c = ConfigParser.ConfigParser()
>>> c.add_section('DEFAULT')
>>> c.write(sys.stdout)
[DEFAULT]

>>> c.set('DEFAULT', 'color', 'yellow')
>>> c.write(sys.stdout)
[DEFAULT]
color = yellow

[DEFAULT]

----
It seems that the correct thing to do would be to disallow
add_section('DEFAULT').
History
Date User Action Args
2008-01-10 02:42:50tleshersetspambayes_score: 0.397021 -> 0.39702117
recipients: + tlesher
2008-01-10 02:42:50tleshersetspambayes_score: 0.397021 -> 0.397021
messageid: <1199932970.3.0.196882211496.issue1781@psf.upfronthosting.co.za>
2008-01-10 02:42:48tlesherlinkissue1781 messages
2008-01-10 02:42:48tleshercreate