Add modified configparser for systemd unit files
Review Request #178 - Created Aug. 4, 2015 and submitted
|mitr, nphilipp, sgallagh, twoerner|
This is a temporary measure; this code will be going upstream into python-systemd in the near future, but for now we will carry it in rolekit.
There is one known limitation to this implementation; It does not support reading unit files with multiline values. This won't be an issue in rolekit, but it's preventing it from going upstream to python-systemd at the moment.
Testing performed manually by loading the python module and writing out some sample unit files. Also tested with the kickstart patch.
Is there a reason why this is not a normal (or class, or static) method? I.e.:
... @staticmethod def optionxform(option): "This method optionally transforms an option." return option ...
Call this more of a gut-feeling, but I'm not sure I like the value of a section being a tuple only if it exists multiple times. I don't think this makes it easier on the user of the class, they need to check if the section exists more than once and then handle it differently than if it doesn't. Or do I misunderstand something?
This looks like a copy-paste error:
is not None**configparser.RawConfigParser**