|
From: Robin M. <rob...@gm...> - 2006-06-08 12:57:23
|
Here's the patch to change the section search behavior. Instead of looking only at DEFAULT sections, it will look at the current section, then its DEFAULT, then move up to the parent section and repeat the process. This is a patch against a version of configobj.py that has the 3rd template interpolation patch (the one in my previous email to this thread) already applied. I've also attached the sample .ini file I used for testing, called "deepsearch.ini", so you can verify for yourself that the code works. Note that a couple of the documentation changes in this patch (particularly the ones where InterpolationDepthError was changed to InterpolationLoopError) should have gone into 3rd-template-interpolation.patch instead. This won't be a problem if both patches go into the SVN tree, but if you decide to reject the change-search-behavior.patch and keep the old "only search a few DEFAULT sections" behavior, then you'll need to cherrypick the relevant documentation patches out of this patch. Shouldn't be difficult, since this patch isn't all that large. I hope this makes it in; I'd really prefer the behavior that this patch implements. -- Robin Munn Rob...@gm... GPG key 0xD6497014 |