mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-13 03:44:02 -07:00
Fix incorrect use of is
for comparisons.
See https://bugs.python.org/issue34850 for details.
This commit is contained in:
parent
cd7a144515
commit
0a461380a3
21 changed files with 42 additions and 42 deletions
|
@ -97,13 +97,13 @@ def run_commands(module, commands, check_rc=True):
|
|||
|
||||
def get_config(module, source='running', flags=None):
|
||||
global _DEVICE_CONFIG
|
||||
if source is 'running' and flags is None and _DEVICE_CONFIG is not None:
|
||||
if source == 'running' and flags is None and _DEVICE_CONFIG is not None:
|
||||
return _DEVICE_CONFIG
|
||||
else:
|
||||
conn = get_connection(module)
|
||||
out = conn.get_config(source=source, flags=flags)
|
||||
cfg = to_text(out, errors='surrogate_then_replace').strip()
|
||||
if source is 'running' and flags is None:
|
||||
if source == 'running' and flags is None:
|
||||
_DEVICE_CONFIG = cfg
|
||||
return cfg
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue