[New-bugs-announce] [issue7005] ConfigParser does not handle options without values

Mats Kindahl report at bugs.python.org
Sun Sep 27 08:14:04 CEST 2009


New submission from Mats Kindahl <mats at sun.com>:

When ConfigParser is used to read in a my.cnf file (MySQL Server
Configuration File), it fails for options that do not have value.

ConfigParser is designed to require a value for each option, but some
systems, such as MySQL option file reader, accepts options without
values. Reading a my.cnf file is almost certain to include options
without values. The server can accept options with values even though
the value is not necessary, but there are some tools that do not allow
values for options that do not require them.

There is an attached patch that optionally will allow options to not
have a value. In order to distinguish options with no value from options
with the empty string, None is assigned to options without values.

The default behavior is to not allow options without values.

----------
components: Library (Lib)
files: cfgparser-1.patch
keywords: patch
messages: 93168
nosy: mkindahl
severity: normal
status: open
title: ConfigParser does not handle options without values
versions: Python 2.6
Added file: http://bugs.python.org/file14985/cfgparser-1.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7005>
_______________________________________


More information about the New-bugs-announce mailing list