#1397 add GrampsDbException handler in CLI import path (grdb not handled)
svn: r9406
This commit is contained in:
parent
f1e80ba499
commit
88f23700a0
@ -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>
|
2007-11-25 Jim Sack <jgsack@san.rr.com>
|
||||||
* src/test/regrtest.py : really do the checkin this time
|
* src/test/regrtest.py : really do the checkin this time
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ import QuestionDialog
|
|||||||
import Config
|
import Config
|
||||||
import RecentFiles
|
import RecentFiles
|
||||||
import Utils
|
import Utils
|
||||||
|
import gen.db.exceptions as GX
|
||||||
|
|
||||||
from PluginUtils import Tool, cl_list, cli_tool_list
|
from PluginUtils import Tool, cl_list, cli_tool_list
|
||||||
from ReportBase import CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB, cl_report
|
from ReportBase import CATEGORY_BOOK, CATEGORY_CODE, CATEGORY_WEB, cl_report
|
||||||
@ -481,6 +482,9 @@ class ArgHandler:
|
|||||||
try:
|
try:
|
||||||
GrampsDbUtils.gramps_db_reader_factory(const.APP_GRAMPS)(
|
GrampsDbUtils.gramps_db_reader_factory(const.APP_GRAMPS)(
|
||||||
self.state.db,filename,empty)
|
self.state.db,filename,empty)
|
||||||
|
except GX.GrampsDbException, e:
|
||||||
|
print "%s" % e.value
|
||||||
|
sys.exit(1)
|
||||||
except:
|
except:
|
||||||
print "Error importing %s" % filename
|
print "Error importing %s" % filename
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user