josegonzalez/python-conf_d — pull request #2 by zerobfd (2013-11-04 02:21:31+00:00)
Title: Parse sections differently for Beaver (allow for [] in section names)

In Beaver, you use globs in section names to assign different parameters to different files, which is great. Python's default ConfigParser, though, doesn't match brackets very well which limits what kind of globs you can use. (i.e. you can't do stuff like server[0-9] as a glob in the section.) I overrode the _read function from the python source to parse section headers differently which allows more glob usage.

Caveats: 1) we haven't pushed our Beaver setup to production with this so it hasn't been production vetted, but it's been handling well in our dev environment so far. 2) This is really an issue with Beaver, but it seemed easier to fix it in conf_d. I haven't tested it except with Beaver, though.

Lines 55-61 differ from the python source, the rest was copy/pasted.