From: Cédric Ollivier Date: Wed, 14 Feb 2018 20:59:04 +0000 (+0100) Subject: Compare strings instead of objects in SecurityGroupConfig X-Git-Tag: opnfv-6.0.0~22^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F52173%2F1;p=snaps.git Compare strings instead of objects in SecurityGroupConfig It could have worked thanks to interned strings. Change-Id: If56cc44fe35ca06bc9033af620ddd3c0586877fe Signed-off-by: Cédric Ollivier --- diff --git a/snaps/config/security_group.py b/snaps/config/security_group.py index 32a1e95..16e68c7 100644 --- a/snaps/config/security_group.py +++ b/snaps/config/security_group.py @@ -54,7 +54,7 @@ class SecurityGroupConfig(object): raise SecurityGroupConfigError('The attribute name is required') for rule_setting in self.rule_settings: - if rule_setting.sec_grp_name is not self.name: + if rule_setting.sec_grp_name != self.name: raise SecurityGroupConfigError( 'Rule settings must correspond with the name of this ' 'security group')