2004-09-13 Tim Waugh <twaugh@redhat.com>

* src/plugins/Ancestors.py (event_info): Prevent constructions like
        "died in before 1901" by playing safe if the mode is not exact.


svn: r3536
This commit is contained in:
Tim Waugh
2004-09-13 15:46:00 +00:00
parent 0b77a1a3a5
commit 72008e1b8b
2 changed files with 7 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ import BaseDoc
import RelLib
import Errors
import Plugins
import Calendar
from QuestionDialog import ErrorDialog
from gettext import gettext as _
@@ -441,7 +442,8 @@ class ComprehensiveAncestorsReport (Report.Report):
if text:
info += ' ' + text[0].lower() + text[1:]
elif dateobj.get_valid ():
if dateobj.is_range ():
if (dateobj.isRange () or
dateobj.get_start_date ().getModeVal () != Calendar.EXACT):
info += ' ' + dateobj.get_date ()
elif (dateobj.get_day_valid () and
dateobj.get_month_valid () and