

def _validate_schema_version(self):
    with self._open_connecton() as conn:
        try:
            c = conn.execute('SELECT schema_version FROM __meta')
            found_version = c.fetchone()[0]
        except sqlite3.OperationalError:
            message = '{} does not appear to be a valid WA results database.'.format(self.database)
            raise ResultProcessorError(message)
        if (found_version != SCHEMA_VERSION):
            message = 'Schema version in {} ({}) does not match current version ({}).'
            raise ResultProcessorError(message.format(self.database, found_version, SCHEMA_VERSION))

dataset/ETHPy150Open ARM-software/workload-automation/wlauto/result_processors/sqlite.py SqliteResultProcessor._validate_schema_version/original