From 40db10e378db6e7b9bc60d05ed6fb0d45f56015d Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 4 Apr 2013 09:27:01 +0000 Subject: [PATCH] fix python3 error and improve upgrade text svn: r21868 --- gramps/gen/db/exceptions.py | 14 ++++++++++---- gramps/gen/db/write.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gramps/gen/db/exceptions.py b/gramps/gen/db/exceptions.py index da128b8e5..a10f4f375 100644 --- a/gramps/gen/db/exceptions.py +++ b/gramps/gen/db/exceptions.py @@ -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") diff --git a/gramps/gen/db/write.py b/gramps/gen/db/write.py index 67ba5af1d..4a2c663bf 100644 --- a/gramps/gen/db/write.py +++ b/gramps/gen/db/write.py @@ -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: