Merge pull request #17426 from privateip/nxos

fixes issue when piping commands through json with output not specifed
This commit is contained in:
Peter Sprygada 2016-09-06 19:24:05 -04:00 committed by GitHub
commit 113dfc5562

View file

@ -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