def check_db_version(type): if type == "SQLite": ver = sqlite.check_db_version() try: return float(ver.strip("'")) except ValueError: return 0.3
def check_db_version(type): if type == "SQLite": try: from pwman.data.drivers import sqlite except ImportError: raise DatabaseException("python-sqlite not installed") ver = sqlite.check_db_version() return ver