#1397 add GrampsDbException handler in CLI import path (grdb not handled)

svn: r9406
This commit is contained in:
James G Sack 2007-11-26 04:43:00 +00:00
parent f1e80ba499
commit 88f23700a0
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-11-25 Jim Sack <jgsack@san.rr.com>
* src/ArgHandler.py : #1397 add except clause for GrampsDbException
applies to CLI (not) handling of grdb imports
2007-11-25 Jim Sack <jgsack@san.rr.com>
* src/test/regrtest.py : really do the checkin this time

View File

@ -58,6 +58,7 @@ import QuestionDialog
import Config
import RecentFiles
import Utils
import gen.db.exceptions as GX
from PluginUtils import Tool, cl_list, cli_tool_list
from ReportBase import CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB, cl_report
@ -481,6 +482,9 @@ class ArgHandler:
try:
GrampsDbUtils.gramps_db_reader_factory(const.APP_GRAMPS)(
self.state.db,filename,empty)
except GX.GrampsDbException, e:
print "%s" % e.value
sys.exit(1)
except:
print "Error importing %s" % filename
sys.exit(1)