nxos_file_copy fix for binary files (#46822)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 9c81634c77
)
This commit is contained in:
parent
f0a706e4a0
commit
914eea8361
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ def md5sum_check(module, dst, file_system):
|
||||||
|
|
||||||
local_file = module.params['local_file']
|
local_file = module.params['local_file']
|
||||||
try:
|
try:
|
||||||
with open(local_file, 'r') as f:
|
with open(local_file, 'rb') as f:
|
||||||
filecontent = f.read()
|
filecontent = f.read()
|
||||||
except (OSError, IOError) as exc:
|
except (OSError, IOError) as exc:
|
||||||
module.fail_json(msg="Error reading the file: %s" % to_text(exc))
|
module.fail_json(msg="Error reading the file: %s" % to_text(exc))
|
||||||
|
|
Loading…
Reference in a new issue