Fixed set_int/sync problem in GrampsCfg, caught BadGEDCOM exception.
svn: r1130
This commit is contained in:
parent
9d94d34a1f
commit
8f084d26e1
@ -359,12 +359,18 @@ def get_int(key,defval=0):
|
||||
else:
|
||||
return defval
|
||||
|
||||
def set_int(key,value):
|
||||
gnome.config.set_int(key,value)
|
||||
|
||||
def set_bool(key,value):
|
||||
gnome.config.set_bool(key,value)
|
||||
|
||||
def set_string(key,value):
|
||||
gnome.config.set_string(key,value)
|
||||
|
||||
def sync():
|
||||
gnome.config.sync()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
@ -135,7 +135,16 @@ def importData(database, filename, cb=None):
|
||||
gnome.ui.GnomeErrorDialog(_("%s could not be opened\n") % filename)
|
||||
return
|
||||
|
||||
close = g.parse_gedcom_file()
|
||||
try:
|
||||
close = g.parse_gedcom_file()
|
||||
except GedcomParser.BadFile, msg:
|
||||
Utils.destroy_passed_object(statusWindow)
|
||||
gnome.ui.GnomeErrorDialog(_("Failure reading %s: %s\n"
|
||||
"First line should have been '0 HEAD'\n"
|
||||
"but was '%s'") %
|
||||
(filename,GedcomParser.BadFile,msg))
|
||||
return
|
||||
|
||||
g.resolve_refns()
|
||||
|
||||
statusTop.get_widget("close").set_sensitive(1)
|
||||
|
Loading…
Reference in New Issue
Block a user