Skip to content
This repository was archived by the owner on Sep 15, 2020. It is now read-only.

Commit ddb6d59

Browse files
committed
[configuration] Add __eq__ override
Adds a __eq__() override to Configuration, highlighted by LGTM review. Signed-off-by: Jake Hunsaker <[email protected]>
1 parent e9360e6 commit ddb6d59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

soscollector/configuration.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ def __init__(self, args=None):
3535
self['host_types'] = self._load_supported_hosts()
3636
self['cluster_types'] = self._load_clusters()
3737

38+
def __eq__(self, other):
39+
if isinstance(other, Configuration):
40+
return all(x == y for x, y in zip(self, other))
41+
return super(Configuration, self).__eq__(other)
42+
3843
def set_defaults(self):
3944
self['sos_mod'] = {}
4045
self['master'] = ''

0 commit comments

Comments
 (0)