changeset 4465:605f31a596b8

Simplify and fix interval comparison.
author Stefan Seefeld <stefan@seefeld.name>
date Fri, 05 Nov 2010 13:17:18 +0000
parents c62c0f383e41
children f1fe6fd0aa61
files roundup/date.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/date.py	Thu Nov 04 22:52:56 2010 +0000
+++ b/roundup/date.py	Fri Nov 05 13:17:18 2010 +0000
@@ -720,6 +720,9 @@
     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):

Roundup Issue Tracker: http://roundup-tracker.org/