mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Ensure proper conversion while backing up of junos config (#28958)
* Ensure proper conversion while backing up of junos config * Minor changes * Fix review comment * Open config backup file in binary mode
This commit is contained in:
parent
f23f2468ec
commit
cc9ed352dd
3 changed files with 6 additions and 5 deletions
|
@ -256,7 +256,7 @@ def filter_delete_statements(module, candidate):
|
|||
if match is None:
|
||||
# Could not find configuration-set in reply, perhaps device does not support it?
|
||||
return candidate
|
||||
config = to_native(match.text, encoding='latin1')
|
||||
config = to_native(match.text, encoding='latin-1')
|
||||
|
||||
modified_candidate = candidate[:]
|
||||
for index, line in reversed(list(enumerate(candidate))):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue