From 8cd0d446c5c28f92cbccc94fa6e213b3bb236ffc Mon Sep 17 00:00:00 2001 From: gnod <37585964+epDHowwD@users.noreply.github.com> Date: Fri, 15 Sep 2023 13:10:55 +0200 Subject: [PATCH] fix data type error in verbosity log printing during yaml loading fixes #3 --- jinja2_tools/objects.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jinja2_tools/objects.py b/jinja2_tools/objects.py index 3400ca6..81f0293 100644 --- a/jinja2_tools/objects.py +++ b/jinja2_tools/objects.py @@ -3,6 +3,7 @@ """ import json import sys +from pprint import pformat from colors import red from jinja2 import Template as Jinja2_template, exceptions @@ -40,8 +41,11 @@ def get_extra_vars(self): """ A simple getter with verbose option """ - print_verbose({'title': '[ExtraVars]', 'content': json.dumps( - self.data, indent=2), 'verbose': self.verbose}) + print_verbose({ + 'title': '[ExtraVars]', + 'content': pformat(self.data), + 'verbose': self.verbose, + }) return self.data