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:
parent
77e7c0538a
commit
2d3c48207b
1 changed files with 3 additions and 0 deletions
|
|
@ -13,6 +13,9 @@ def main(tree, options):
|
||||||
raise ValueError(f"Error: the {filename} service exceeds the maximum filename length.")
|
raise ValueError(f"Error: the {filename} service exceeds the maximum filename length.")
|
||||||
|
|
||||||
cfg = options["config"]
|
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)
|
config = configparser.ConfigParser(allow_no_value=True)
|
||||||
# prevent conversion of the option name to lowercase
|
# prevent conversion of the option name to lowercase
|
||||||
config.optionxform = lambda option: option
|
config.optionxform = lambda option: option
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue