Rewrite `converter.py` with a parser using Augeas
We are using a configuration editing tool augeas
in Deckard (for parsing rpl files) which provides the machinery to programatically read, create and create configuration files without the need for regex spaghetti. (http://augeas.net/)
Since unbound.conf
structure seems pretty simple so I could write a lens
(basically a regular grammar with some thing added for a possibility of two way conversion between a AST and plaintext). (This was actually suggested in Augeas' issue tracker https://github.com/hercules-team/augeas/issues/162).
The code would end up much nicer and sustainable since all the regex shenanigans would be neatly packed outside of the Python code.