diff --git a/ChangeLog b/ChangeLog index dd58820cc..9ccb848b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-26 Brian Matherly + * src/ReportBase/_CommandLineReport.py: + 0001835: cli crashes for all reports. NoneType has no attribute + get_gramps_id + 2008-02-26 Benny Malengier * src/ScratchPad.py: bug when dragging sourceref #1833 * src/GrampsDisplay.py: remove whitespace diff --git a/src/ReportBase/_CommandLineReport.py b/src/ReportBase/_CommandLineReport.py index 0f544fe08..57a12b9e7 100644 --- a/src/ReportBase/_CommandLineReport.py +++ b/src/ReportBase/_CommandLineReport.py @@ -28,12 +28,17 @@ # #------------------------------------------------------------------------- from gettext import gettext as _ +import sys import logging log = logging.getLogger(".") +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- import PluginUtils -from BasicUtils import name_displayer import Utils import BaseDoc from ReportBase import CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK, \ @@ -68,6 +73,9 @@ def _initialize_options(options, dbase): if not person: person = dbase.get_default_person() option.set_value(person.get_gramps_id()) + if not person: + print "Please specify a person" + sys.exit(0) elif isinstance(option, PluginUtils.FamilyOption): fid = option.get_value()