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

Fixed incompatible unicode and int comparison in zabbix_host module w… #43097

Merged
merged 1 commit into from Jul 22, 2018

Conversation

D3DeFi
Copy link
Contributor

@D3DeFi D3DeFi commented Jul 20, 2018

…hen using proxy option

SUMMARY

zabbix_host module ignores comparison restrictions enforced in Python 3. It tries to compare unicode string (returned from zabbix-api) with integer. This action results in error when ansible is used with Python 3:

The full traceback is:
  File "/tmp/user/0/ansible_1uuzvwdi/ansible_module_zabbix_host.py", line 324, in update_host
    if proxy_id >= 0:

"'>=' not supported between instances of 'str' and 'int'"

Fixes #42617

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix_host

ANSIBLE VERSION
ansible 2.7.0.dev0 (zabbix-host-py3-comparison-fix 3272188170) last updated 2018/07/20 16:14:19 (GMT +200)
  config file = None
  configured module search path = [u'/home/dusan.matejka/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dusan.matejka/projects/ansible/ansible-upstream/lib/ansible
  executable location = /home/dusan.matejka/projects/ansible/ansible-upstream/bin/ansible
  python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0]

@ansibot
Copy link
Contributor

ansibot commented Jul 20, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. python3 small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Jul 20, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Jul 20, 2018
@D3DeFi
Copy link
Contributor Author

D3DeFi commented Jul 20, 2018

shipit

1 similar comment
@resmo
Copy link
Contributor

resmo commented Jul 22, 2018

shipit

@ansibot ansibot added automerge This PR was automatically merged by ansibot. shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jul 22, 2018
@ansibot ansibot merged commit d43b2b5 into ansible:devel Jul 22, 2018
@D3DeFi D3DeFi deleted the zabbix-host-py3-comparison-fix branch July 22, 2018 14:52
@dagwieers dagwieers added the zabbix Zabbix community label Jan 28, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 automerge This PR was automatically merged by ansibot. bug This issue/PR relates to a bug. module This issue/PR relates to a module. owner_pr This PR is made by the module's maintainer. python3 shipit This PR is ready to be merged by Core small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. zabbix Zabbix community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zabbix_host module error: "'>=' not supported between instances of 'str' and 'int'"
5 participants