10000 Fix python3 compat issue with iosxr_config by pabelanger · Pull Request #57919 · ansible/ansible · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix python3 compat issue with iosxr_config #57919

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 an 8000 d privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ansible/modules/network/iosxr/iosxr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"""
import re

from ansible.module_utils._text import to_text
from ansible.module_utils._text import to_text, to_bytes
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import ConnectionError
from ansible.module_utils.network.iosxr.iosxr import load_config, get_config, get_connection
Expand All @@ -251,7 +251,7 @@ def copy_file_to_node(module):
"""
src = '/tmp/ansible_config.txt'
file = open(src, 'wb')
file.write(module.params['src'])
file.write(to_bytes(module.params['src'], errors='surrogate_or_strict'))
file.close()

dst = '/harddisk:/ansible_config.txt'
Expand Down
0