mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -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
|
@ -509,7 +509,7 @@ def core(module):
|
|||
|
||||
res['changed'] = False
|
||||
if state in ['active']:
|
||||
if v.status(name) is not 'active':
|
||||
if v.status(name) != 'active':
|
||||
res['changed'] = True
|
||||
res['msg'] = v.start(name)
|
||||
elif state in ['present']:
|
||||
|
@ -523,13 +523,13 @@ def core(module):
|
|||
elif state in ['inactive']:
|
||||
entries = v.list_nets()
|
||||
if name in entries:
|
||||
if v.status(name) is not 'inactive':
|
||||
if v.status(name) != 'inactive':
|
||||
res['changed'] = True
|
||||
res['msg'] = v.destroy(name)
|
||||
elif state in ['undefined', 'absent']:
|
||||
entries = v.list_nets()
|
||||
if name in entries:
|
||||
if v.status(name) is not 'inactive':
|
||||
if v.status(name) != 'inactive':
|
||||
v.destroy(name)
|
||||
res['changed'] = True
|
||||
res['msg'] = v.undefine(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue