diff --git a/src/wstool/config_yaml.py b/src/wstool/config_yaml.py index 19f82e5..294f596 100644 --- a/src/wstool/config_yaml.py +++ b/src/wstool/config_yaml.py @@ -442,11 +442,8 @@ def generate_config_yaml(config, filename, header, pretty=False, items = [x.get_legacy_yaml(spec, exact) for x in items] if items: - if pretty: - content += yaml.safe_dump(items, allow_unicode=True, - default_flow_style=False) - else: - content += yaml.safe_dump(items) + content += yaml.safe_dump(items, allow_unicode=True, + default_flow_style=False if pretty else None) if filename: config_filepath = filename if os.path.isabs(filename) else \