diff --git a/ChangeLog b/ChangeLog index 48f4eaa00..70974afb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-31 Jim Sack + * src/Gramps.py In run(), skip error-dialog for things like + exit(0) such as used when processing command-line operations. + Add missing gtk.main_quit needed to terminate process + 2007-10-29 Gary Burton * src/RelLib/_Person.py: setting the death index wrongly. diff --git a/src/gramps.py b/src/gramps.py index 47b75049b..4e4893f54 100644 --- a/src/gramps.py +++ b/src/gramps.py @@ -170,9 +170,14 @@ def run(): try: gramps_main.Gramps(args) - except SystemExit, msg: - log.error("Gramps terminated with the following message:\n %s." - % msg, exc_info=True) + except SystemExit, err: + # err.message may be numeric=0 or string="" or None or False + # or (), or [], .. , all of which are non-error conditions + # which need no error logging/dialog here (lower-level, maybe) + if err and err.message: + log.error("Gramps terminated with the following message:\n %r." + % err.message, exc_info=True) + gtk.main_quit() except: log.error("Gramps failed to start.", exc_info=True)