Merge pull request #17426 from privateip/nxos
fixes issue when piping commands through json with output not specifed
This commit is contained in:
commit
113dfc5562
1 changed files with 2 additions and 0 deletions
|
@ -283,4 +283,6 @@ def prepare_commands(commands):
|
|||
for cmd in to_list(commands):
|
||||
if cmd.output == 'json':
|
||||
cmd.command_string = jsonify(cmd)
|
||||
if cmd.command.endswith('| json'):
|
||||
cmd.output = 'json'
|
||||
yield cmd
|
||||
|
|
Loading…
Reference in a new issue