diff options
author | 2018-02-14 21:59:04 +0100 | |
---|---|---|
committer | 2018-02-14 22:00:01 +0100 | |
commit | 4dc7181e433296d2ad7b69e0cf4be2c0f14ff4c5 (patch) | |
tree | 3027f8eec2b2331c60395aff57b214b6020b8048 | |
parent | 60cb38cd5ea0a7ad5d6ed164a0b8ac622871b154 (diff) |
Compare strings instead of objects in SecurityGroupConfig
It could have worked thanks to interned strings.
Change-Id: If56cc44fe35ca06bc9033af620ddd3c0586877fe
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | snaps/config/security_group.py | 2 |
1 files changed, 1 insertions, 1 deletions
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') |