0003874: ImportGedcom: does not recognise changes to 'preferences.default-source' after startup
svn: r18850
This commit is contained in:
parent
da75a38762
commit
8872ab4ec2
@ -51,12 +51,7 @@ import libgedcom
|
|||||||
module = __import__("libgedcom")
|
module = __import__("libgedcom")
|
||||||
reload (module)
|
reload (module)
|
||||||
|
|
||||||
try:
|
import config
|
||||||
import config
|
|
||||||
DEFAULT_SOURCE = config.get('preferences.default-source')
|
|
||||||
except ImportError:
|
|
||||||
LOG.warn("No Config module available using defaults.")
|
|
||||||
DEFAULT_SOURCE = False
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -111,8 +106,9 @@ def importData(database, filename, callback=None):
|
|||||||
if code_set:
|
if code_set:
|
||||||
stage_one.set_encoding(code_set)
|
stage_one.set_encoding(code_set)
|
||||||
ifile.seek(0)
|
ifile.seek(0)
|
||||||
gedparse = libgedcom.GedcomParser(database, ifile, filename, callback,
|
gedparse = libgedcom.GedcomParser(
|
||||||
stage_one, DEFAULT_SOURCE)
|
database, ifile, filename, callback, stage_one,
|
||||||
|
config.get('preferences.default-source'))
|
||||||
except IOError, msg:
|
except IOError, msg:
|
||||||
ErrorDialog(_("%s could not be opened\n") % filename, str(msg))
|
ErrorDialog(_("%s could not be opened\n") % filename, str(msg))
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user