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
Type check fails when using in an ansible action plugin #210
Comments
I think I know how to fix the issue. We should not be comparing their types, we should be checking if it is an instance of the base type. I'll get a PR ready, and if you can verify it fixes the issue, I think we'll be able to get a solution out. |
Thanks for the quick patch. I'm hitting this strange error:
I installed by doing:
Maybe I'm doing something stupid. Just looking into it. EDIT: just to clarify if I then install the version from pypi, I can reproduce the error in this bug report again (i.e we get further) |
My bad.. I wasn't returning anything from the action plugin. Modifying it to:
Appears to work:
Thanks very much :) |
Great, I'll roll out the fix to PyPI sometime today. |
Fix released |
I'm hitting the following error when trying to use your library in ansible action plugin:
I've simplified this down to:
and
and you run can run it with:
This used to work until ansible/ansible#82294 was merged. It looks like the behaviour to preserve AnsibleUnsafeText seems to be correct (as it was set from a user controllable environment variable), so I am just wondering if we make the check less restrictive. Both instances pass instanceof(instance, str), but only the glob passes instanceof(instance, 'ansible.utils.unsafe_proxy.AnsibleUnsafeText).AnsibleUnsafeText behaves exactly like a string but is used to mark it as unsafe to template.
The text was updated successfully, but these errors were encountered: