diff options
author | Devaev Maxim <[email protected]> | 2019-04-06 05:32:02 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-06 08:04:26 +0300 |
commit | 1d75b738a08c98a5d3d8ac3c685e77360f4c1267 (patch) | |
tree | 3aa89dc7fd0ab737e9332714a784e9d4dde0a362 /kvmd/yamlconf/dumper.py | |
parent | 73e04b71ed55a46c939f12548b31746617af2bca (diff) |
validators, tests
Diffstat (limited to 'kvmd/yamlconf/dumper.py')
-rw-r--r-- | kvmd/yamlconf/dumper.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/yamlconf/dumper.py b/kvmd/yamlconf/dumper.py index 517965fe..93bced3a 100644 --- a/kvmd/yamlconf/dumper.py +++ b/kvmd/yamlconf/dumper.py @@ -44,17 +44,17 @@ def _inner_make_dump(config: Section, _level: int=0) -> List[str]: for (key, value) in sorted(config.items(), key=operator.itemgetter(0)): indent = " " * _INDENT * _level if isinstance(value, Section): - lines.append("{}{}:".format(indent, key)) + lines.append("%s%s:" % (indent, key)) lines += _inner_make_dump(value, _level + 1) lines.append("") else: default = config._get_default(key) # pylint: disable=protected-access comment = config._get_help(key) # pylint: disable=protected-access if default == value: - lines.append("{}{}: {} # {}".format(indent, key, _make_yaml(value, _level), comment)) + lines.append("%s%s: %s # %s" % (indent, key, _make_yaml(value, _level), comment)) else: - lines.append("{}# {}: {} # {}".format(indent, key, _make_yaml(default, _level), comment)) - lines.append("{}{}: {}".format(indent, key, _make_yaml(value, _level))) + lines.append("%s# %s: %s # %s" % (indent, key, _make_yaml(default, _level), comment)) + lines.append("%s%s: %s" % (indent, key, _make_yaml(value, _level))) return lines |