mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Fixes eos sending 'None' to device (#33015)
* Fix network_cli sometimes sending 'None' to device * Also fix `--become-method=enable`
This commit is contained in:
parent
5747bf34d1
commit
71a6dcdf3e
2 changed files with 6 additions and 4 deletions
|
@ -116,7 +116,7 @@ class Connection(ConnectionBase):
|
|||
cmd = json.loads(to_text(cmd, errors='surrogate_or_strict'))
|
||||
kwargs = {'command': to_bytes(cmd['command'], errors='surrogate_or_strict')}
|
||||
for key in ('prompt', 'answer', 'send_only'):
|
||||
if key in cmd:
|
||||
if cmd.get(key) is not None:
|
||||
kwargs[key] = to_bytes(cmd[key], errors='surrogate_or_strict')
|
||||
return self.send(**kwargs)
|
||||
except ValueError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue