stages/systemd.unit.create: comment for allow_no_value

Add a comment explaining why we need to set allow_no_value=True for the
configparser.
This commit is contained in:
Achilleas Koutsou 2024-03-25 15:14:07 +01:00 committed by Michael Vogt
parent 77e7c0538a
commit 2d3c48207b

View file

@ -13,6 +13,9 @@ def main(tree, options):
raise ValueError(f"Error: the {filename} service exceeds the maximum filename length.")
cfg = options["config"]
# We trick configparser into letting us write multiple instances of the same option by writing them as keys with no
# value, so we enable allow_no_value
config = configparser.ConfigParser(allow_no_value=True)
# prevent conversion of the option name to lowercase
config.optionxform = lambda option: option