Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix data type error in verbosity log printing during yaml loading #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions jinja2_tools/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import json
import sys
from pprint import pformat

from colors import red
from jinja2 import Template as Jinja2_template, exceptions
Expand Down Expand Up @@ -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,
})
Comment on lines +44 to +48
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print_verbose({
'title': '[ExtraVars]',
'content': pformat(self.data),
'verbose': self.verbose,
})
print_verbose(pformat({
'title': '[ExtraVars]',
'content': self.data,
'verbose': self.verbose,
}))

return self.data


Expand Down