1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nxos_file_copy fix for binary files (#46822)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-10-22 15:41:18 +05:30 committed by GitHub
parent 6bd4665c4e
commit 9c81634c77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,7 +191,7 @@ def md5sum_check(module, dst, file_system):
local_file = module.params['local_file']
try:
with open(local_file, 'r') as f:
with open(local_file, 'rb') as f:
filecontent = f.read()
except (OSError, IOError) as exc:
module.fail_json(msg="Error reading the file: %s" % to_text(exc))