import sqlite3


def get_setting(path, name):
    """Gets a setting value from the settings database."""

    db = sqlite3.connect(path)

    r = db.execute("SELECT value FROM setting WHERE key = ?", (name,)).fetchone()

    return r[0] if r else None