From 0adcb8b7e6d13d51d5a7ec033162e8d29f88d956 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 8 Jul 2001 05:44:42 +0000 Subject: [PATCH] Fixed None comparison for dates svn: r238 --- gramps/src/Date.py | 4 +++- gramps/src/const.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/src/Date.py b/gramps/src/Date.py index 50d3b761d..35364c4a1 100644 --- a/gramps/src/Date.py +++ b/gramps/src/Date.py @@ -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) diff --git a/gramps/src/const.py b/gramps/src/const.py index c7db67949..28b79d9b7 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -74,7 +74,7 @@ gtkrcFile = rootDir + os.sep + "gtkrc" # #------------------------------------------------------------------------- progName = "gramps" -version = "0.3.2" +version = "0.4.0pre" copyright = "(C) 2001 Donald N. Allingham" authors = ["Donald N. Allingham"] comments = _("Gramps (Genealogical Research and Analysis Management Programming System) is a personal genealogy program that can be extended by using the Python programming language.")