From: stefan Date: Fri, 5 Nov 2010 13:17:18 +0000 (+0000) Subject: Simplify and fix interval comparison. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b5264517ddce88390bb87f29c925a73716c89c51;hp=e11411fd69f9cf171b25d17fba3d9423071fef1b;p=roundup.git Simplify and fix interval comparison. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4574 57a73879-2fb5-44c3-a270-3262357dd7e2 --- 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):