spack_yaml.py: fix default_flow_style (#44998)

This commit is contained in:
Harmen Stoppels 2024-07-02 14:01:13 +02:00 committed by GitHub
parent 2e8b4e660e
commit a6e6093922
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,8 +233,8 @@ def wrapper(data, stream=None, **kwargs):
@return_string_when_no_stream
def dump(data, stream=None, default_flow_style=False):
handler = ConfigYAML(yaml_type=YAMLType.GENERIC_YAML)
handler.default_flow_style = default_flow_style
handler.width = maxint
handler.yaml.default_flow_style = default_flow_style
handler.yaml.width = maxint
return handler.dump(data, stream=stream)