def checkversion(self, dbname): """Return the effective version of a database.""" with sql.Updater(dbname, defs.get(dbname)) as updater: return updater._version
def __init__(self, dbname=None): if dbname is None: dbdefs = defs.getall() self.updaters = tuple(sql.Updater(k, dbdefs[k]) for k in dbdefs) else: self.updaters = (sql.Updater(dbname, defs.get(dbname)), )