From 4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 9 Nov 2023 13:57:26 +0100 Subject: added new function to get env which handles missing env better... --- scripts/common/queue.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/common/queue.py') diff --git a/scripts/common/queue.py b/scripts/common/queue.py index de49802..f67acbb 100644 --- a/scripts/common/queue.py +++ b/scripts/common/queue.py @@ -2,13 +2,14 @@ """ common functions and stuff """ import logging -import os import pickle from litequeue import SQLQueue -QUEUE_DB = os.environ.get("el_QUEUE_db", "litequeue.db") -QUEUE_DIR = os.environ.get("el_QUEUE_dir", "queue") +from . import env + +QUEUE_DB = env("el_QUEUE_db", "litequeue.db") +QUEUE_DIR = env("el_QUEUE_dir", "queue") QUEUE_DB = QUEUE_DIR + "/" + QUEUE_DB -- cgit v1.2.3