Use the normal sys.exit() instead of os._exit() because the latter will

not flush any output. Also catch the SysExit exceptions in gramps.py and
do a gtk.main_quit() just to be sure. This all is to make commandline
processing usable.


svn: r8308
This commit is contained in:
Kees Bakker
2007-03-20 19:21:41 +00:00
parent 781d67a409
commit e92a5979a8
3 changed files with 45 additions and 39 deletions

View File

@ -170,6 +170,11 @@ def run():
try:
gramps_main.Gramps(args)
except SystemExit, e:
if e.code:
log.error("Gramps terminated with exit code: %d." % e.code, exc_info=True)
gtk.main_quit()
return False
except:
log.error("Gramps failed to start.", exc_info=True)