Write an equivalence test for domains, fixes #65
(cherry picked from commit 144f427088acf9439fd9971898296137b8339f9a)
This commit is contained in:
@@ -90,6 +90,12 @@ class Domain(Base):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __eq__(self, other):
|
||||
try:
|
||||
return self.name == other.name
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
class Email(Base):
|
||||
""" Abstraction for an email address (localpart and domain).
|
||||
|
||||
Reference in New Issue
Block a user