diff --git a/lib/ansible/plugins/cliconf/eos.py b/lib/ansible/plugins/cliconf/eos.py index f878a843ec1..b5db998a378 100644 --- a/lib/ansible/plugins/cliconf/eos.py +++ b/lib/ansible/plugins/cliconf/eos.py @@ -69,7 +69,7 @@ class Cliconf(CliconfBase): raise ValueError("fetching configuration from %s is not supported" % source) cmd = 'show %s ' % lookup[source] - if format and format is not 'text': + if format and format != 'text': cmd += '| %s ' % format cmd += ' '.join(to_list(flags)) diff --git a/lib/ansible/plugins/cliconf/nxos.py b/lib/ansible/plugins/cliconf/nxos.py index dac95a22af3..dedabe82605 100644 --- a/lib/ansible/plugins/cliconf/nxos.py +++ b/lib/ansible/plugins/cliconf/nxos.py @@ -147,7 +147,7 @@ class Cliconf(CliconfBase): raise ValueError("fetching configuration from %s is not supported" % source) cmd = 'show {0} '.format(lookup[source]) - if format and format is not 'text': + if format and format != 'text': cmd += '| %s ' % format if flags: