From af1a841da2624eb8eb31103db6dcce14fda702ee Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Wed, 10 Jul 2019 14:59:11 -0700 Subject: [PATCH] Set flow style for non-pretty YAML dumps (#133) The default changed from `None` to `False` in 5.1. --- src/wstool/config_yaml.py | 2 +- src/wstool/multiproject_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wstool/config_yaml.py b/src/wstool/config_yaml.py index 19f82e5..e64325b 100644 --- a/src/wstool/config_yaml.py +++ b/src/wstool/config_yaml.py @@ -446,7 +446,7 @@ def generate_config_yaml(config, filename, header, pretty=False, content += yaml.safe_dump(items, allow_unicode=True, default_flow_style=False) else: - content += yaml.safe_dump(items) + content += yaml.safe_dump(items, default_flow_style=None) if filename: config_filepath = filename if os.path.isabs(filename) else \ diff --git a/src/wstool/multiproject_cli.py b/src/wstool/multiproject_cli.py index 3c652d0..b0148cc 100644 --- a/src/wstool/multiproject_cli.py +++ b/src/wstool/multiproject_cli.py @@ -1274,7 +1274,7 @@ def cmd_info(self, target_path, argv, reverse=True, config=None): # but that command was not implemented. source_aggregate = multiproject_cmd.cmd_snapshot(config, localnames=args) - print(yaml.safe_dump(source_aggregate), end='') + print(yaml.safe_dump(source_aggregate, default_flow_style=None), end='') return 0 # this call takes long, as it invokes scms.