DB-API: fix version

This commit is contained in:
Doug Blank 2016-04-16 18:25:21 -04:00
parent 8fd4f7ff8e
commit f09c32181a
3 changed files with 6 additions and 2 deletions

View File

@ -229,7 +229,10 @@ class CLIDbManager(object):
version = open(os.path.join(dirpath, "bdbversion.txt")).read() version = open(os.path.join(dirpath, "bdbversion.txt")).read()
except: except:
version = "(0, 0, 0)" version = "(0, 0, 0)"
try:
version = ast.literal_eval(version) version = ast.literal_eval(version)
except:
version = (0, 0, 0)
if os.path.isfile(path_name): if os.path.isfile(path_name):
file = open(path_name, 'r', encoding='utf8') file = open(path_name, 'r', encoding='utf8')
name = file.readline().strip() name = file.readline().strip()

View File

@ -430,6 +430,8 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
__callback_map = {} __callback_map = {}
VERSION = (18, 0, 0)
def __init__(self, directory=None): def __init__(self, directory=None):
DbReadBase.__init__(self) DbReadBase.__init__(self)
DbWriteBase.__init__(self) DbWriteBase.__init__(self)

View File

@ -40,7 +40,6 @@ class DBAPI(DbGeneric):
""" """
Database backends class for DB-API 2.0 databases Database backends class for DB-API 2.0 databases
""" """
VERSION = (18, 0, 0)
def restore(self): def restore(self):
""" """