From 0d287624c4669c0045a1909af7f1f50a5c7ae0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Murta?= Date: Tue, 10 Jan 2023 21:35:43 +0000 Subject: [PATCH] Load the default DB from the .env file --- pfbudget/cli/runnable.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pfbudget/cli/runnable.py b/pfbudget/cli/runnable.py index f41187d..b367ad2 100644 --- a/pfbudget/cli/runnable.py +++ b/pfbudget/cli/runnable.py @@ -1,6 +1,8 @@ +from dotenv import load_dotenv import argparse import datetime as dt import decimal +import os import re from pfbudget.common.types import Operation @@ -10,8 +12,9 @@ import pfbudget.reporting.graph import pfbudget.reporting.report import pfbudget.utils +load_dotenv() -DEFAULT_DB = "data.db" +DEFAULT_DB = os.environ.get("DEFAULT_DB") class PfBudgetInitialized(Exception):