|
From: F. <bou...@gm...> - 2010-08-13 14:43:01
|
Le 13/08/2010 14:34, Michael Foord a écrit : > On 13/08/2010 13:29, François wrote: >> Hi, >> >> I don't know if it is a bug or if I'm using the library in a wrong way >> but I can pass successfully a configfile which is obviously wrong. >> >> > I think you are using validation incorrectly. Try printing the result of > config.validate(Validator()) and I think you will see your mistake. > > Michael > You mean I have to make a for loop on the hash elements to be sure they are all correct? >> here, the files: >> cat monte.py >> http://pastebin.com/2Z8JUHrH >> cat choices.conf >> http://pastebin.com/EstuqNhK >> cat specs.conf >> http://pastebin.com/EVhh6vfy >> >> _________________ >> If choices.conf is >> >> [Pierre] >> Lundi=r >> >> then it prints OOPS. >> >> >> _________________ >> If choices.conf is >> >> [Pierre] >> Lundi=r >> >> [Paul] >> Lundi=r >> >> >> then it prints OOPS. >> >> >> But if only one variable named Lundi is wrong, it prints 'OK' >> >> >> Do you have any idea? I didn't any clue in the documentation, maybe I >> missed an option... >> >> Regards, >> Francois. >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by >> >> Make an app they can't live without >> Enter the BlackBerry Developer Challenge >> http://p.sf.net/sfu/RIM-dev2dev >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> > |