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: for var in variables:
try: try:
res = environ[var] res = environ[var]
if var == "CHANNEL": # create a list if var == "CHANNEL":
res = res.split(',') res = list(set(res.split(',')) - set([""])) # create a list for the channels and remove blank channels
keys[var] = res keys[var] = res
except KeyError: except KeyError:
print(f"Please set the environment variable {var} (.env file supported)") print(f"Please set the environment variable {var} (.env file supported)")