-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
The Cheetah template engine does not work and raises an exception due to not rendering the template before returning it #51711
Comments
It looks like the issue is that the type that's being assumed to be a string is a
|
From looking at the code, it looks like the Cheetah template is supposed to have its __str__() method called in order to be able to treat it as a string. As usual, I guess I'll write up a PR for this one too... |
Yea. It looks like you need to explicitly call |
This is fixed by PR #51718. |
…to get synchronized via the remote-minion states.
Fix the Cheetah template renderer in salt.utils.templates, and unit-tests for Jinja, Cheetah, Mako, Genshi, wempy templates,
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Closing this as it was fixed by PR #51718 which was merged last monthish. |
Description of Issue/Question
It seems like the Cheetah template doesn't appear to work. The following exception is raised when trying to use it:
Setup
Just get setup to use
file.managed
with template set to Cheetah.Steps to Reproduce Issue
One doesn't even need any template variables, just try and use the Cheetah state to render anything and this exception gets raised. This particular code in salt.utils.stringutils hasn't been touched in a year.
Versions Report
Although this is an older version, the relevant code hasn't changed in a year. This seems to be a type error due to a string being assumed when it's an object of some sort. It's in a condition that checks to see if Windows is being used and if so to try and convert it to unicode or something..
The text was updated successfully, but these errors were encountered: