fix dci failure nxos (#32877)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2017-11-14 07:17:21 +00:00 committed by GitHub
parent a17244f896
commit ceefeeb279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,7 @@ class Cli:
except ValueError:
out = to_text(out).strip()
if item['output'] == 'json' and isinstance(out, string_types):
if item['output'] == 'json' and out != 'ok' and isinstance(out, string_types):
self._module.fail_json(msg='failed to retrieve output of %s in json format' % item['command'])
responses.append(out)