fix 'NoneType' and 'str' when DUNITER env not found

This commit is contained in:
ManUtopiK 2022-12-07 19:12:37 +01:00
parent b8c84c8126
commit b7d55cfb89
1 changed files with 6 additions and 3 deletions

View File

@ -17,9 +17,12 @@ dotenv_path = join(dirname(__file__),MY_PATH + '.env')
load_dotenv(dotenv_path)
# Set global values (default parameters) , regarding variables environments
node = os.getenv('DUNITER') + '/gva'
if not node:
node="https://g1.librelois.fr/gva"
duniter = os.getenv('DUNITER') + 'gva'
if not duniter:
node = "https://g1.librelois.fr/gva"
else:
node = os.getenv('DUNITER') + '/gva'
pod = os.getenv('ESNODE')
if not pod: