From 028f55910afbd9a997eca70d5e9124d12e43d113 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Tue, 4 Oct 2022 12:14:32 -0700 Subject: [PATCH] fix for rare instances when the output is a list of lists (yaml | yaml -> json) --- jc/cli.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index ceea1f23..9f9c5523 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -620,10 +620,11 @@ class JcCli(): self.data_out.append({}) for item in self.data_out: - if '_jc_meta' not in item: - item['_jc_meta'] = {} + if isinstance(item, dict): + if '_jc_meta' not in item: + item['_jc_meta'] = {} - item['_jc_meta'].update(meta_obj) + item['_jc_meta'].update(meta_obj) else: utils.error_message(['Parser returned an unsupported object type.'])