Skip to content

Commit

Permalink
fix: Return empty list when there is no content in res_ks_list
Browse files Browse the repository at this point in the history
  • Loading branch information
skycastlelily authored and dav-pascual committed Nov 7, 2024
1 parent 962bcd0 commit 70e07c1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mrack/transformers/beaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ def _construct_ks_append_script(self, ks_append, pubkeys=None):
if pubkeys:
res_ks_list += ["%post"] + self._allow_ssh_keys(pubkeys) + ["%end"]

return [
"\n".join(res_ks_list),
]
return ["\n".join(res_ks_list)] if res_ks_list else []

def _allow_ssh_keys(self, pubkeys):
"""Create ssh key content to be injected to xml."""
Expand Down

0 comments on commit 70e07c1

Please sign in to comment.