Fixes rest of "not in" usage
find quantum -type f -name "*py" -exec grep -HE " not [^ ]+ in " {} \; Change-Id: Ief9560e515c05f05c0b5346609b87a8fdde569d7
This commit is contained in:
parent
d07725d93c
commit
9466b83ff8
@ -127,8 +127,8 @@ class Controller(object):
|
||||
fields_to_strip = []
|
||||
|
||||
return dict(item for item in data.iteritems()
|
||||
if self._is_visible(item[0])
|
||||
and not item[0] in fields_to_strip)
|
||||
if (self._is_visible(item[0]) and
|
||||
item[0] not in fields_to_strip))
|
||||
|
||||
def _do_field_list(self, original_fields):
|
||||
fields_to_add = None
|
||||
@ -376,7 +376,7 @@ class Controller(object):
|
||||
field_list = [name for (name, value) in self._attr_info.iteritems()
|
||||
if ('required_by_policy' in value and
|
||||
value['required_by_policy'] or
|
||||
not 'default' in value)]
|
||||
'default' not in value)]
|
||||
orig_obj = self._item(request, id, field_list=field_list,
|
||||
parent_id=parent_id)
|
||||
orig_obj.update(body[self._resource])
|
||||
|
@ -198,7 +198,7 @@ class MetaPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
|
||||
self._extend_network_dict_l3(context, net)
|
||||
if not fields or FLAVOR_NETWORK in fields:
|
||||
self._extend_network_dict(context, net)
|
||||
if fields and not 'id' in fields:
|
||||
if fields and 'id' not in fields:
|
||||
del net['id']
|
||||
return net
|
||||
|
||||
|
@ -173,7 +173,7 @@ class NvpPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
|
||||
if not def_cluster_name:
|
||||
LOG.info(_("Default cluster name not specified. "
|
||||
"Using first cluster:%s"), first_cluster_name)
|
||||
elif not def_cluster_name in self.clusters:
|
||||
elif def_cluster_name not in self.clusters:
|
||||
LOG.warning(_("Default cluster name %(def_cluster_name)s. "
|
||||
"Using first cluster:%(first_cluster_name)s"),
|
||||
locals())
|
||||
|
Loading…
Reference in New Issue
Block a user