def __init__(self, root, **kwargs):
self.root = root
self.cfg = kwargs
self.http_path = kwargs.get("http_path", "github")
self.oauth = github.OAuth(**root.config.secrets[self.cfg["name"]])
store = kwargs["data-path"]
os.makedirs(store, exist_ok=True)
self.users = dbm.open(os.path.join(store, "users.db"), "cs")
self.orgs = dbm.open(os.path.join(store, "orgs.db"), "cs")
session_store = dbm.open(os.path.join(store, "sessions.db"), "cs")
self.ss = SessionStore(session_store, kwargs.get("cookie_name", "ghs"))
评论列表
文章目录