From de7430eeb887ac782954dd0771d0021229e30e2e Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 17 Jun 2015 06:28:29 -0400 Subject: [PATCH] 8614: addresses pickleupgrade.txt issue, by kulath --- gramps/gen/db/write.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps/gen/db/write.py b/gramps/gen/db/write.py index 607735ec8..e0e09d708 100644 --- a/gramps/gen/db/write.py +++ b/gramps/gen/db/write.py @@ -722,8 +722,11 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): # Check for pickle upgrade versionpath = os.path.join(self.path, str(PCKVERSFN)) - if not os.path.isfile(versionpath) and \ - not self.readonly and not self.update_pickle_version: + # Up to gramps 3.4.x PCKVERSFN was not written + # Gramps 4.2 incorrectly wrote PCKVERSFN = 'Yes' for Python2, so check + # whether python is upgraded + if ((not self.readonly and not self.update_pickle_version) and + (not os.path.isfile(versionpath) or self.update_python_version)): _LOG.debug("Make backup in case there is a pickle upgrade") self.__make_zip_backup(name) self.update_pickle_version = True