0006713: Databases written with pickle protocol 3 (Python3) should not be opened with pickle protocol 2 (Python2). Also give warning when about to upgrade a Python2 database to Python3.

svn: r22241
This commit is contained in:
Tim G L Lyons
2013-05-10 14:29:47 +00:00
parent 380c3a5764
commit ddecdb854e
4 changed files with 151 additions and 6 deletions

View File

@@ -169,6 +169,12 @@ class CLIDbLoader(object):
except gen.db.exceptions.DbUpgradeRequiredError, msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except gen.db.exceptions.PythonUpgradeRequiredError, msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except gen.db.exceptions.PythonDowngradeError, msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except gen.db.exceptions.DbVersionError, msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))