From 7c7736764ae4d145497b68da009dc71eb9ba45ab Mon Sep 17 00:00:00 2001 From: Tyler Date: Fri, 22 Nov 2024 19:44:10 -0800 Subject: [PATCH] dotenv not really needed, plus system packages are hammered dogshit --- app.py | 14 +++++++++----- install.sh | 0 uninstall.sh | 0 3 files changed, 9 insertions(+), 5 deletions(-) mode change 100644 => 100755 install.sh mode change 100644 => 100755 uninstall.sh diff --git a/app.py b/app.py index f32817d..e3a6dec 100644 --- a/app.py +++ b/app.py @@ -20,11 +20,15 @@ import logging import socket import json from tools import sanity_check -from dotenv import load_dotenv -load_dotenv() - -SERMON_DB = os.getenv("KJV_SERMON_DB") -SECRET_API_KEY = os.getenv("KJV_SECRET_API_KEY") +try: + from dotenv import load_dotenv + load_dotenv() + SERMON_DB = os.getenv("KJV_SERMON_DB") + SECRET_API_KEY = os.getenv("KJV_SECRET_API_KEY") +except: + KJV_SERMON_DB="./data/sermons.db" + # this does not do anything unless sermon_analyzer.py is running in tcp socket mode as a separate process + KJV_SECRET_API_KEY="testing" sequential_purge_delta: timedelta = timedelta(days=90) timestamp_runtime: datetime = datetime.now().strftime("%d%b%y-%H:%M") diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 diff --git a/uninstall.sh b/uninstall.sh old mode 100644 new mode 100755