mirror of
https://github.com/zerwes/ansible-fqcn-converter.git
synced 2025-02-25 18:55:30 -06:00
fixed pyyaml list indent (pyyaml/issue #234)
This commit is contained in:
parent
89f80443cb
commit
e66a7a8a63
@ -35,6 +35,9 @@ def isexcluded(path, _exclude_paths):
|
|||||||
fnmatch.fnmatch(ppath, ep)
|
fnmatch.fnmatch(ppath, ep)
|
||||||
for ep in _exclude_paths
|
for ep in _exclude_paths
|
||||||
)
|
)
|
||||||
|
class Dumper(yaml.Dumper):
|
||||||
|
def increase_indent(self, flow=False, *args, **kwargs):
|
||||||
|
return super().increase_indent(flow=flow, indentless=False)
|
||||||
|
|
||||||
basepath = os.path.dirname(os.path.realpath(__file__))
|
basepath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
@ -173,6 +176,7 @@ if not fqcnmapfile or args.updatefqcnmapfile:
|
|||||||
fqcnmapfile.write(
|
fqcnmapfile.write(
|
||||||
yaml.dump(
|
yaml.dump(
|
||||||
fqcndict,
|
fqcndict,
|
||||||
|
Dumper=Dumper,
|
||||||
sort_keys=True,
|
sort_keys=True,
|
||||||
indent=2,
|
indent=2,
|
||||||
width=70,
|
width=70,
|
||||||
|
Loading…
Reference in New Issue
Block a user