From 716a3119e7a61b43c7f9258a77e6bd3797b2728c Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 22 Apr 2005 19:49:08 +0000 Subject: [PATCH] * src/Date.py (__cmp__): check for Date instance before compare * src/plugins/DetAncestralReport.py: fixed i18n strings * src/ReadGedcom.py: handle FTM style of child/parent relationship translation * src/gedcomimport.py: svn: r4403 --- gramps2/ChangeLog | 7 +++++++ gramps2/src/Date.py | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0712a8e37..b840be5c6 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2005-04-22 Don Allingham + * src/Date.py (__cmp__): check for Date instance before compare + 2005-04-21 Martin Hawlisch * src/ReadGedcom.py (parse_family_object): Set MediaRef properly; (parse_individual): Set Adoption event properly; @@ -24,6 +27,10 @@ * src/plugins/ChangeNames.py: fix typo 2005-04-20 Don Allingham + * src/plugins/DetAncestralReport.py: fixed i18n strings + * src/ReadGedcom.py: handle FTM style of child/parent relationship + translation + * src/gedcomimport.py: * src/DisplayModels.py: fix bad index into list * src/Relationship.py: handle race condition where the screen wants to update with a stale family handle after the database diff --git a/gramps2/src/Date.py b/gramps2/src/Date.py index 51ba9d1d4..811b2b92c 100644 --- a/gramps2/src/Date.py +++ b/gramps2/src/Date.py @@ -135,7 +135,10 @@ class Date: Comparison function. Allows the usage of equality tests. This allows you do run statements like 'date1 <= date2' """ - return cmp(self.sortval,other.sortval) + if isinstance(other,Date): + return cmp(self.sortval,other.sortval) + else: + return -1 def is_equal(self,other): """