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

[2.9] ansible-test: make pylint deprecation plugin not choke on tagged versions #69851

Merged
merged 2 commits into from Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/69851-ansible-test-pylint-versions.yml
@@ -0,0 +1,2 @@
bugfixes:
- "ansible-test pylint sanity test - do not crash when ``version`` specified to ``AnsibleModule.deprecate()`` or ``Display.deprecated()`` contains string components, f.ex. tagged version numbers for Ansible 2.10."
Expand Up @@ -87,6 +87,11 @@ def visit_call(self, node):
self.add_message('ansible-deprecated-version', node=node, args=(version,))
except ValueError:
self.add_message('ansible-invalid-deprecated-version', node=node, args=(version,))
except TypeError:
# This happens if version starts with string components, and LooseVersion
# comparison tries to compare int with str. This can happen for tagged
# versions from Ansible 2.10.
pass
except AttributeError:
# Not the type of node we are interested in
pass
Expand Down