From 7a37afa82f315d2e82f27c026e5736965a173346 Mon Sep 17 00:00:00 2001 From: bom Date: Thu, 29 Dec 2022 10:11:44 +0100 Subject: [PATCH] Support nested-dicts in generate-clojure-map --- src/main/python/ddadevops/c4k_mixin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/python/ddadevops/c4k_mixin.py b/src/main/python/ddadevops/c4k_mixin.py index c6cbd1d..e59172f 100644 --- a/src/main/python/ddadevops/c4k_mixin.py +++ b/src/main/python/ddadevops/c4k_mixin.py @@ -25,7 +25,10 @@ class C4kMixin(DevopsBuild): def __generate_clojure_map(self, template_dict): clojure_map_str = '{' for key, value in template_dict.items(): - clojure_map_str += f':{key} "{value}"\n' + if type(value) is dict: + clojure_map_str += f':{key} {self.__generate_clojure_map(value)}\n' + else: + clojure_map_str += f':{key} "{value}"\n' clojure_map_str += '}' return clojure_map_str