fix python3 error and improve upgrade text

svn: r21868
This commit is contained in:
Benny Malengier 2013-04-04 09:27:01 +00:00
parent 7a7e95410a
commit 40db10e378
2 changed files with 11 additions and 5 deletions

View File

@ -171,7 +171,13 @@ class DbUpgradeRequiredError(Exception):
Exception.__init__(self) Exception.__init__(self)
def __str__(self): def __str__(self):
return _("You cannot open this database without upgrading it.\n" return _("The Family Tree structure has changed since the version of"
"If you upgrade then you won't be able to use previous " " Gramps you used to create this tree.\n\n"
"versions of Gramps.\n" "Therefore, you cannot open this Family Tree without upgrading the"
"You might want to make a backup copy first.") " 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. # self.secondary_connected flag should be set accordingly.
if self.need_schema_upgrade(): if self.need_schema_upgrade():
_LOG.debug("Schema upgrade required from %s to %s" % _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: if force_schema_upgrade == True or force_bsddb_upgrade == True:
self.gramps_upgrade(callback) self.gramps_upgrade(callback)
else: else: