More robust container comparator

This commit is contained in:
Einar Forselv
2019-04-19 00:13:51 +02:00
parent ba642eeb4b
commit 3dc3ce5eb9
2 changed files with 7 additions and 0 deletions

View File

@@ -132,6 +132,12 @@ class Container:
return value.split(',')
def __eq__(self, other):
if other is None:
return False
if not isinstance(other, Container):
return False
return self.id == other.id