Re: [Rest2web-develop] rest2web and ConfigObj
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-08-10 21:57:58
|
>> 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 . -- Nicola Larosa - ni...@te... When I thought life had some purpose - Then I thought I had some choice (I was running blind) And I made some value judgments - In a self-important voice (I was outa line) But then absurdity came over me - And I longed to lose control (into no mind) Oh all I ever wanted - Was just to come in from the cold -- Joni Mitchell, Come in from the cold, Night Ride Home, 1991 |