From 70e07c191e9f148cb774a1aa5dfc35dc79c5106d Mon Sep 17 00:00:00 2001 From: Lili Nie Date: Wed, 6 Nov 2024 04:48:00 -0500 Subject: [PATCH] fix: Return empty list when there is no content in res_ks_list --- src/mrack/transformers/beaker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mrack/transformers/beaker.py b/src/mrack/transformers/beaker.py index 37800ade..332891ad 100644 --- a/src/mrack/transformers/beaker.py +++ b/src/mrack/transformers/beaker.py @@ -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."""