Sometimes merging of passwords.yml gives json

Dumping of password dictionary can look quite different depending
on passwords structure. To always get yaml we need to use block
style for dump(), see
    http://pyyaml.org/wiki/PyYAMLDocumentation#Dictionarieswithoutnestedcollectionsarenotdumpedcorrectly

Change-Id: Ideee1aefedbba35480947956821341c6ef75088e
Closes-Bug: #1647308
This commit is contained in:
Vladislav Belogrudov 2016-12-05 13:17:54 +03:00
parent 62c6d5a379
commit 0ea98608e5

View File

@ -32,7 +32,7 @@ def main():
new_passwords.update(old_passwords)
with open(args.final, "w") as destination:
yaml.dump(new_passwords, destination)
yaml.dump(new_passwords, destination, default_flow_style=False)
if __name__ == '__main__':