From 0ea98608e59c2c241d1d420c8db54df8d980a8c0 Mon Sep 17 00:00:00 2001 From: Vladislav Belogrudov Date: Mon, 5 Dec 2016 13:17:54 +0300 Subject: [PATCH] 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 --- kolla/cmd/mergepwd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolla/cmd/mergepwd.py b/kolla/cmd/mergepwd.py index b8fde1c778..44053f8e1b 100755 --- a/kolla/cmd/mergepwd.py +++ b/kolla/cmd/mergepwd.py @@ -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__':