fix python3 error and improve upgrade text

svn: r21867
This commit is contained in:
Benny Malengier 2013-04-04 09:26:53 +00:00
parent 6ddff4b560
commit 0c2c56ec4c
2 changed files with 11 additions and 5 deletions

View File

@ -171,7 +171,13 @@ class DbUpgradeRequiredError(Exception):
Exception.__init__(self)
def __str__(self):
return _("You cannot open this database without upgrading it.\n"
"If you upgrade then you won't be able to use previous "
"versions of Gramps.\n"
"You might want to make a backup copy first.")
return _("The Family Tree structure has changed since the version of"
" Gramps you used to create this tree.\n\n"
"Therefore, you cannot open this Family Tree without upgrading the"
" definition of the structure.\n"
"If you upgrade then you won't be able to use previous "
"versions of Gramps!\n\n"
"Upgrading is a difficult task that may not be interrupted, or "
"Gramps will irretrievably corrupt your tree. Therefore, create "
"a backup copy first. See: \n"
"http://www.gramps-project.org/wiki/index.php?title=How_to_make_a_backup")

View File

@ -633,7 +633,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
# self.secondary_connected flag should be set accordingly.
if self.need_schema_upgrade():
_LOG.debug("Schema upgrade required from %s to %s" %
(self.metadata.get('version', default=0), _DBVERSION))
(self.metadata.get(b'version', default=0), _DBVERSION))
if force_schema_upgrade == True or force_bsddb_upgrade == True:
self.gramps_upgrade(callback)
else: