Skip to content

Commit

Permalink
Make packit work with pyyaml < 5.1
Browse files Browse the repository at this point in the history
See: yaml/pyyaml#199

Signed-off-by: Nikola Forró <nforro@redhat.com>
  • Loading branch information
nforro committed Dec 8, 2020
1 parent 485bd88 commit 746957b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packit/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_message_from_metadata(metadata: dict, header: Optional[str] = None) -> s
f"We can save only dictionaries to metadata. Not {metadata}"
)

content = yaml.dump(metadata, indent=4) if metadata else ""
content = yaml.dump(metadata, indent=4, default_flow_style=False) if metadata else ""
if not header:
return content

Expand Down
2 changes: 1 addition & 1 deletion packit/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def from_commit(
if metadata:
logger.debug(
f"Commit {commit.hexsha:.8} metadata:\n"
f"{yaml.dump(metadata, indent=4)}"
f"{yaml.dump(metadata, indent=4, default_flow_style=False)}"
)
metadata_defined = True
else:
Expand Down

0 comments on commit 746957b

Please sign in to comment.