|
From: Michael F. <fuz...@vo...> - 2010-07-14 10:06:34
|
On 14/07/2010 10:05, Tom wrote: > Hi, > > i use validate and a configspec to validate my config file. But it's > still possible to write any other key/values (not mentioned in my > configspec) in the config file and the validation process still returns > True. How to handle this? > > As of ConfigObj 4.7.0 you can use the get_extra_values function to find out if there were any additional values, not covered by the configspec, in a config file: http://www.voidspace.org.uk/python/configobj.html#get-extra-values All the best, Michael Foord > Cheers, > > Tom > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. |