Don't depend on string interning
Use '!=' instead of 'is not' to compare strings. In practice, short strings that appear in the source code are interned in CPython, but this is implementation-specific. Change-Id: If3f305c2d647fcd7515cb0a326a30f4eda93acd3
This commit is contained in:
parent
f12fb69cb2
commit
31584326d2
@ -144,7 +144,7 @@ class L7Rule(neutron.NeutronResource):
|
||||
|
||||
def handle_create(self):
|
||||
rule_args = dict((k, v) for k, v in self.properties.items()
|
||||
if k is not self.L7POLICY)
|
||||
if k != self.L7POLICY)
|
||||
return rule_args
|
||||
|
||||
def check_create_complete(self, rule_args):
|
||||
|
@ -1338,7 +1338,7 @@ class Stack(collections.Mapping):
|
||||
self.reset_dependencies()
|
||||
self._resources = None
|
||||
|
||||
if action is not self.CREATE:
|
||||
if action != self.CREATE:
|
||||
self.updated_time = oslo_timeutils.utcnow()
|
||||
|
||||
if new_stack is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user