mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user