From 0f912079e95b0f81cc112de51430b96c5144ad2e Mon Sep 17 00:00:00 2001 From: Harpo Harbert Date: Thu, 3 Oct 2024 13:01:43 -0700 Subject: [PATCH] Skip dotenv if not installed --- organ/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/organ/config.py b/organ/config.py index b84721a..cbc8a76 100644 --- a/organ/config.py +++ b/organ/config.py @@ -1,8 +1,12 @@ from os import environ -from dotenv import load_dotenv +try: + from dotenv import load_dotenv + + load_dotenv() +except ImportError: + pass -load_dotenv() ENVIRONMENT = environ.get('ENVIRONMENT', 'development') DB_URL = environ.get('DB_URL', 'postgresql://postgres:postgres@localhost:5432/organ')