Hello guys,
ConfigObj has what I consider to be a serious bug. To be honest I'm
*really* surprised it hasn't been reported before (and that I didn't
think of it when writing ConfigObj).
Hashes is keys in values aren't quoted. This means they are read back
in as comments, breaking the config file.
This is relatively easy to fix (inside the '_quote' method). However, we
don't quote (or unquote) values when 'list_values' is set to False. This
means that I don't know what to do.
The first thing to do is to fix the bug for normal operation - even if
it leaves the bug in place when we're not handling list values.
In the long run it would be better to do the quoting and unquoting when
list values is off - except I can't remember why it was implemented like
that in the first place! To change it will also break backwards
compatibility with existing config files.
I can try and hunt down the reason for the current implementation (I
think it was convenience but that may not be the case). I don't know
what to do about the backwards compatibility issue though.
Michael
http://www.manning.com/foord
|