fixed .env loading
This commit is contained in:
4
main.py
4
main.py
@@ -4,6 +4,8 @@ import os
|
||||
from dotenv import load_dotenv
|
||||
import logging
|
||||
|
||||
load_dotenv()
|
||||
|
||||
##########################################
|
||||
#Logging
|
||||
if os.environ['logging_level'] == "DEBUG":
|
||||
@@ -22,8 +24,6 @@ ch.setFormatter(formatter)
|
||||
logger.addHandler(ch)
|
||||
##########################################
|
||||
|
||||
load_dotenv()
|
||||
|
||||
ntfy_token = os.environ['NTFY_Token']
|
||||
device_name = os.environ['device_name']
|
||||
shutdown_timer = int(os.environ['shutdown_timer'])
|
||||
|
||||
Reference in New Issue
Block a user