Skip to content

Commit

Permalink
CRAYSAT-1895: fixed --format yaml issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanholen-hpe committed Nov 20, 2024
1 parent a363e55 commit 44e39bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sat/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,15 @@ def _xname_representer(dumper, xname):
)


def _looseversion_representer(dumper, looseversion):
return dumper.represent_scalar(
BaseResolver.DEFAULT_SCALAR_TAG, looseversion.version_str
)


SATDumper.add_representer(OrderedDict, _ordered_dict_representer)
SATDumper.add_representer(XName, _xname_representer)
SATDumper.add_representer(LooseVersion, _looseversion_representer)


# A function to dump YAML to be used by all SAT code.
Expand Down

0 comments on commit 44e39bd

Please sign in to comment.