From b5264517ddce88390bb87f29c925a73716c89c51 Mon Sep 17 00:00:00 2001 From: stefan Date: Fri, 5 Nov 2010 13:17:18 +0000 Subject: [PATCH] Simplify and fix interval comparison. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4574 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/date.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roundup/date.py b/roundup/date.py index a86ed59..af8d1d5 100644 --- a/roundup/date.py +++ b/roundup/date.py @@ -720,6 +720,9 @@ class Interval: def __cmp__(self, other): """Compare this interval to another interval.""" + if other is None: + # we are always larger than None + return 1 return cmp(self.as_seconds(), other.as_seconds()) def __str__(self): -- 2.30.2