diff --git a/cassandra/util.py b/cassandra/util.py index f4bc1b1c..7f17e85d 100644 --- a/cassandra/util.py +++ b/cassandra/util.py @@ -973,6 +973,8 @@ class Time(object): microsecond=self.nanosecond // Time.MICRO) == other def __lt__(self, other): + if not isinstance(other, Time): + return NotImplemented return self.nanosecond_time < other.nanosecond_time def __repr__(self): @@ -1061,6 +1063,8 @@ class Date(object): return False def __lt__(self, other): + if not isinstance(other, Date): + return NotImplemented return self.days_from_epoch < other.days_from_epoch def __repr__(self):