* src/gramps.py (run): Catch SystemExit exception.
svn: r8568
This commit is contained in:
parent
84fbe9cd81
commit
e41160bb3e
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user