* 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>
|
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/ArgHandler.py: Use sys.exit() for bailing out.
|
||||||
* src/GrampsDb/_ReadXML.py (start_url): Correctly parse url type;
|
* src/GrampsDb/_ReadXML.py (start_url): Correctly parse url type;
|
||||||
Use sys.ext() for bailing out.
|
Use sys.ext() for bailing out.
|
||||||
|
@ -469,7 +469,7 @@ class ArgHandler:
|
|||||||
GrampsDb.gramps_db_reader_factory(const.app_gramps_xml)(
|
GrampsDb.gramps_db_reader_factory(const.app_gramps_xml)(
|
||||||
self.state.db,filename,None,self.cl)
|
self.state.db,filename,None,self.cl)
|
||||||
except:
|
except:
|
||||||
msg "Error importing %s" % filename
|
msg = "Error importing %s" % filename
|
||||||
sys.exit(msg)
|
sys.exit(msg)
|
||||||
elif format == 'geneweb':
|
elif format == 'geneweb':
|
||||||
import ImportGeneWeb
|
import ImportGeneWeb
|
||||||
|
@ -170,6 +170,9 @@ def run():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
gramps_main.Gramps(args)
|
gramps_main.Gramps(args)
|
||||||
|
except SystemExit, msg:
|
||||||
|
log.error("Gramps terminated with the following message:\n %s."
|
||||||
|
% msg, exc_info=True)
|
||||||
except:
|
except:
|
||||||
log.error("Gramps failed to start.", exc_info=True)
|
log.error("Gramps failed to start.", exc_info=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user