Thanks for this - I'll look into fixing it and pushing out a bugfix
release shortly.
All the best,
Michael
Pascal Chambon wrote:
> Hello
>
> Here are 3 files that isolate the bug. Just
> launch the python file as a script to see.
>
> * When 2 config sections are present, and one has all its config
> values mispelled, we get a "missing section" error instead of "missing
> keys" ones.
>
> * If we remove the valid "[ input ]" section in the INI file (letting
> only the 'empty' "[ output ]" one, we get a weirder output :
> configobj.validate returns simply "False", not a dictionary, whereas
> the doc doesn't mention that behaviour. And so the error message we
> want to output is corrupted (we don't even get the name of the missing
> section/keys).
>
> Good luck for with this, if more info/help required just tell me.
>
> Regards,
> Pascal Chambon
>
> ------------------------------------------------------------------------
> *De :* Pascal Chambon [mailto:pyt...@gm...]
> *Envoyé :* lundi 29 juin 2009 19:47
> *À :* con...@li...
> *Objet :* Re: [Configobj-develop] - confused by an error message
>
> Sure, I send it in one week (as soon I as get back from holiday to
> my work project...)
>
> Regards,
> Pascal
>
> Michael Foord wrote:
>> That does sound like a bug in ConfigObj. Could you post an example ini
>> file and code that shows the problem please.
>>
>> Thanks
>>
>> Michael
>>
>>
>> --
>> http://www.ironpythoninaction.com
>>
>> On 29 Jun 2009, at 16:14, Pascal Chambon <pyt...@gm...> wrote:
>>
>>
>>> Hello
>>>
>>> I just report a little confusion I once faced : I kept having a
>>> "missing
>>> section" error message when validating my config.ini file, and I
>>> didn't
>>> understand because the section WAS there. In the end, I realized that
>>> there were just typos in the names of the variables inside that
>>> section,
>>> and it made the validator believe that the section didn't exist at all
>>> (actually it existed, but it was empty).
>>> So well, if it's not too much trouble for such a minor bug, it might
>>> be
>>> cool to replace this error message with a more accurate ones ("field
>>> mysection.xxx is missing" or smth like that).
>>>
>>> Cheers for all,
>>> regards,
>>> Pascal Chambon
>>>
>>> ---
>>> ---
>>> ---
>>> ---------------------------------------------------------------------
>>> _______________________________________________
>>> Configobj-develop mailing list
>>> Con...@li...
>>> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Configobj-develop mailing list
>> Con...@li...
>> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>>
>>
>
> *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified.
> If you are not the intended addressee of this message, please cancel
> it immediately and inform the sender.
> ********************************
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
|