* src/gramps.py (run): Catch SystemExit exception.

svn: r8568
This commit is contained in:
Alex Roitman 2007-06-17 01:20:09 +00:00
parent 84fbe9cd81
commit e41160bb3e
3 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,5 @@
2007-06-16 Alex Roitman <shura@gramps-project.org>
* src/gramps.py (run): Catch SystemExit exception.
* src/ArgHandler.py: Use sys.exit() for bailing out.
* src/GrampsDb/_ReadXML.py (start_url): Correctly parse url type;
Use sys.ext() for bailing out.

View File

@ -469,7 +469,7 @@ class ArgHandler:
GrampsDb.gramps_db_reader_factory(const.app_gramps_xml)(
self.state.db,filename,None,self.cl)
except:
msg "Error importing %s" % filename
msg = "Error importing %s" % filename
sys.exit(msg)
elif format == 'geneweb':
import ImportGeneWeb

View File

@ -170,6 +170,9 @@ 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:
log.error("Gramps failed to start.", exc_info=True)