forked from andreeuuetoa/litsimaja
Set paths absolute
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from dotenv import dotenv_values
|
||||
import pathlib
|
||||
|
||||
|
||||
def populate_values(load: {}):
|
||||
@@ -26,9 +27,10 @@ class Config(object):
|
||||
_config: {} = {}
|
||||
|
||||
def __init__(self):
|
||||
rp = str(pathlib.Path(__file__).parent.parent.absolute())
|
||||
load_conf = {
|
||||
**dotenv_values(".env.defaults"),
|
||||
**dotenv_values(".env"),
|
||||
**dotenv_values(rp + "/.env.defaults"),
|
||||
**dotenv_values(rp + "/.env"),
|
||||
}
|
||||
self._config = populate_values(load_conf)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user