move db_path default to load_config

This commit is contained in:
io 2021-07-26 06:47:43 +00:00
parent d0965d437b
commit 9b60540d07
3 changed files with 3 additions and 2 deletions

View file

@ -8,7 +8,7 @@ def make_sentence(cfg):
def test_sentence_input(self, sentence):
return True # all sentences are valid <3
db = sqlite3.connect(cfg.get("db_path", "posts.db"))
db = sqlite3.connect(cfg["db_path"])
db.text_factory = str
c = db.cursor()
if cfg['learn_from_cw']: