Code

Simplify and fix interval comparison.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 5 Nov 2010 13:17:18 +0000 (13:17 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 5 Nov 2010 13:17:18 +0000 (13:17 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4574 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/date.py

index a86ed59fe0a3e909e58f040f7663c47c07d3ac21..af8d1d533c155a4bf2c6ca055a640f342cc6c5ef 100644 (file)
@@ -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):