better channel parse

This commit is contained in:
Mylloon 2021-07-27 20:54:42 +02:00
parent 8ee24fe256
commit 3780a3564f

View file

@ -9,8 +9,8 @@ def load(variables):
for var in variables:
try:
res = environ[var]
if var == "CHANNEL": # create a list
res = res.split(',')
if var == "CHANNEL":
res = list(set(res.split(',')) - set([""])) # create a list for the channels and remove blank channels
keys[var] = res
except KeyError:
print(f"Please set the environment variable {var} (.env file supported)")