diff roundup/date.py @ 1494:66cc5c2819dd

oops, Interval sorting ignored sign
author Richard Jones <richard@users.sourceforge.net>
date Thu, 06 Mar 2003 06:12:30 +0000
parents 37a1906f4454
children 8ee69708da0c
line wrap: on
line diff
--- a/roundup/date.py	Thu Mar 06 06:06:49 2003 +0000
+++ b/roundup/date.py	Thu Mar 06 06:12:30 2003 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: date.py,v 1.44 2003-03-06 02:33:56 richard Exp $
+# $Id: date.py,v 1.45 2003-03-06 06:12:30 richard Exp $
 
 __doc__ = """
 Date, time and time interval handling.
@@ -355,11 +355,12 @@
         """Compare this interval to another interval."""
         if other is None:
             return 1
-        for attr in ('year', 'month', 'day', 'hour', 'minute', 'second'):
+        for attr in 'sign year month day hour minute second'.split():
             if not hasattr(other, attr):
                 return 1
             r = cmp(getattr(self, attr), getattr(other, attr))
-            if r: return r
+            if r:
+                return r
         return 0
 
     def __str__(self):

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