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

proxmox_template: Prevent utf-8 codec error in py3 #44228

Merged
merged 1 commit into from
Aug 23, 2018
Merged

proxmox_template: Prevent utf-8 codec error in py3 #44228

merged 1 commit into from
Aug 23, 2018

Conversation

boriel
Copy link
Contributor

@boriel boriel commented Aug 15, 2018

SUMMARY

Cannot upload templates in Python 3.x. Gives utf-8 codec error.
Fixes this by opening the template file in binary mode.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • proxmox_template.py
ANSIBLE VERSION
ansible 2.7.0.dev0 (Bug_Fixes_for_proxmox_template.py 273fea557f) last updated 2018/08/15 20:48:44 (GMT +200)
  config file = None
  configured module search path = ['/Users/boriel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/boriel/Documents/src/ansible/lib/ansible
  executable location = /Users/boriel/.virtualenvs/gramlover-ansible-dev-py3/bin/ansible
  python version = 3.6.1 (default, Apr 19 2017, 20:46:54) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.41)]
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Aug 15, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. cloud 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. new_contributor This PR is the first contribution by a new community member. python3 small_patch support:community This issue/PR relates to code supported by the Ansible community. labels Aug 15, 2018
Cannot upload templates in Python 3.x. Gives utf-8 codec error.
Fixes this by opening the template file in binary mode.
@boriel
Copy link
Contributor Author

boriel commented Aug 15, 2018

Sorry @UnderGreen
Pushed again to improve commit message in English

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Aug 15, 2018
Copy link
Contributor

@resmo resmo left a comment

Choose a reason for hiding this comment

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

shipit

@gundalow gundalow changed the title Prevent utf-8 codec error in py3 proxmox_template: Prevent utf-8 codec error in py3 Aug 21, 2018
@gundalow
Copy link
Contributor

@UnderGreen If you could review this again we can look at getting this merged and backported, thanks in advance

@gundalow gundalow self-assigned this Aug 21, 2018
@UnderGreen
Copy link
Contributor

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 Aug 21, 2018
@mkrizek
Copy link
Contributor

mkrizek commented Aug 21, 2018

rebuild_merge

@mkrizek
Copy link
Contributor

mkrizek commented Aug 21, 2018

^^^ Bot failed to automerge this (crashed with tb), trying the command above instead.

@ansibot ansibot merged commit 14e3feb into ansible:devel Aug 23, 2018
@dagwieers dagwieers added the virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox) label Feb 11, 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. cloud module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. 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. virt Virt community (incl. QEMU, KVM, libvirt, ovirt, RHV and Proxmox)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants