diff --git a/ispoof/spoofer/location.py b/ispoof/spoofer/location.py index 0ebfed0..5064dc5 100644 --- a/ispoof/spoofer/location.py +++ b/ispoof/spoofer/location.py @@ -98,4 +98,13 @@ class Location(TypeDecorator): def __repr__(self): return str(self.latitude) + "," + str(self.longitude) + def __eq__(self, other): + if isinstance(other, Location): + return (self.latitude == other.latitude and + self.longitude == other.longitude) + return False + + def __hash__(self): + return hash((self.latitude, self.longitude)) + \ No newline at end of file