From 31584326d2512523804bc5e8bb286d8f682495d5 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 12 Oct 2018 16:31:26 -0400 Subject: [PATCH] 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 --- heat/engine/resources/openstack/neutron/lbaas/l7rule.py | 2 +- heat/engine/stack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/heat/engine/resources/openstack/neutron/lbaas/l7rule.py b/heat/engine/resources/openstack/neutron/lbaas/l7rule.py index 827975c70e..28d0052e3d 100644 --- a/heat/engine/resources/openstack/neutron/lbaas/l7rule.py +++ b/heat/engine/resources/openstack/neutron/lbaas/l7rule.py @@ -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): diff --git a/heat/engine/stack.py b/heat/engine/stack.py index 65367097e3..f203166b64 100644 --- a/heat/engine/stack.py +++ b/heat/engine/stack.py @@ -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: