6863: Failed to open file with Gramps 3.4.5

Use the write_version method rather than reinvent it...

svn: r22867
This commit is contained in:
Vassilii Khachaturov 2013-08-14 20:43:49 +00:00
parent e75ec08061
commit 6b9ea867ee

View File

@ -349,11 +349,7 @@ class CLIDbManager(object):
self.__start_cursor(_("Importing data...")) self.__start_cursor(_("Importing data..."))
dbclass = gen.db.DbBsddb dbclass = gen.db.DbBsddb
dbase = dbclass() dbase = dbclass()
from gen.db.dbconst import BDBVERSFN dbase.write_version(new_path)
versionpath = os.path.join(name, BDBVERSFN)
_LOG.debug("Write bsddb version %s" % str(dbase.version()))
with open(versionpath, "w") as version_file:
version_file.write(str(dbase.version()))
dbase.load(new_path, callback) dbase.load(new_path, callback)
import_function = plugin.get_import_function() import_function = plugin.get_import_function()