fix error where sqlite db could not be created

This commit is contained in:
Remy Moll 2022-11-04 14:40:30 +01:00
parent 191d008451
commit 9e257f12a1

View File

@ -4,6 +4,7 @@ Runs the news_fetch pipeline against a manually curated list of urls and saves t
import sys
sys.path.append("../news_fetch")
import runner
import os
import logging
logger = logging.getLogger()
@ -49,6 +50,8 @@ def show():
if __name__ == "__main__":
logger.info("Overwriting production values for single time media-fetch")
if not os.path.exists("../.dev/"):
os.mkdir("../.dev/")
runner.configuration.models.set_db(
runner.configuration.SqliteDatabase("../.dev/media_downloads.db")
)