Re: [Rest2web-develop] rest2web and ConfigObj
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-08-11 14:28:23
|
Nicola Larosa wrote: >>>I've implemented (and checked in) defaults as discussed. I've done one >>>test - more appreciated ;-) >>> >>>It uses the 'default' keyword in checks, and adds a new attribute >>>'defaults' on sections. >>> >>>If a keyword is missing but a default is supplied, then the default is >>>used. (The default *is* still passed to the check so that type >>>conversion can be done). > > > Here, in validate.py, you were using the "pop" method of dicts. Alas, it > was introduced in Python 2.3, so it broke compatibility with Python 2.2 . > > Moreover, there was a naked except: clause in ConfigObj.validate that > silenced the exception (*never* use naked except: clauses). > > I fixed both problems, maybe not in the cleanest way, see the code. All > tests pass once again on Python 2.2, 2.3 and 2.4 . > Brilliant by the way..... Nice one. Regards, Fuzzy http://www.voidspace.org.uk/python |