Fix incorrect use of is for comparisons.

See https://bugs.python.org/issue34850 for details.
This commit is contained in:
Matt Clay 2019-02-12 15:15:23 -08:00
parent cd7a144515
commit 0a461380a3
21 changed files with 42 additions and 42 deletions

View file

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