Fixed None comparison for dates

svn: r238
This commit is contained in:
Don Allingham
2001-07-08 05:44:42 +00:00
parent 51ddab3871
commit 22936c7641
2 changed files with 4 additions and 2 deletions

View File

@@ -324,7 +324,9 @@ class SingleDate:
#
#--------------------------------------------------------------------
def __cmp__(self,other):
if self.year != other.year:
if other == None:
return 0
elif self.year != other.year:
return cmp(self.year,other.year)
elif self.month != other.month:
return cmp(self.month,other.month)