1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-02 16:48:56 +00:00

Bugfix: if you define __eq__, you should define __ne__ too

This commit is contained in:
Marius Gedminas 2015-09-24 12:43:33 +03:00
parent 5d29a2eabd
commit a2bc6b4b26
2 changed files with 38 additions and 0 deletions

View file

@ -38,6 +38,9 @@ class Host:
def __eq__(self, other):
return self.name == other.name
def __ne__(self, other):
return not self.__eq__(other)
def serialize(self):
groups = []
for group in self.groups: