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
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: