Lint: E713 test for membership should be 'not in'

This commit is contained in:
2020-11-06 20:37:52 -05:00
parent fde8ea2fea
commit aecb845d6a
6 changed files with 19 additions and 19 deletions

View File

@ -660,7 +660,7 @@ def get_list(zk_conn, node, state, limit, is_fuzzy=True):
if state:
valid_states = [ 'start', 'restart', 'shutdown', 'stop', 'disable', 'fail', 'migrate', 'unmigrate', 'provision' ]
if not state in valid_states:
if state not in valid_states:
return False, 'VM state "{}" is not valid.'.format(state)
full_vm_list = zkhandler.listchildren(zk_conn, '/domains')