We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7085fd4 commit c1dd25fCopy full SHA for c1dd25f
swatch/app.py
@@ -60,6 +60,10 @@ def __init_db__(self):
60
"""Init the Swatch database."""
61
db_file = os.environ.get("DB_FILE", CONST_DB_FILE)
62
63
+ if not os.path.exists(db_file):
64
+ logging.debug(f"{db_file} doesn't exist, creating...")
65
+ os.makedirs(db_file)
66
+
67
swatch_db = SqliteExtDatabase(db_file)
68
69
router = Router(swatch_db)
swatch/snapshot.py
@@ -54,7 +54,6 @@ def save_snapshot(
54
if not os.path.exists(file_dir):
55
logging.debug(f"{file_dir} doesn't exist, creating...")
56
os.makedirs(file_dir)
57
- return False
58
59
file = f"{file_dir}/{file_name}"
0 commit comments