1
0
Fork 0
mirror of synced 2024-05-28 16:29:43 +12:00

Update the yaml loading

This commit is contained in:
Phxntxm 2019-11-18 21:26:39 -06:00
parent c8da4839a8
commit d37ab8d91c

View file

@ -7,7 +7,7 @@ global_config = {}
# Ensure that the required config.yml file actually exists # Ensure that the required config.yml file actually exists
try: try:
with open("config.yml", "r") as f: with open("config.yml", "r") as f:
global_config = yaml.load(f) global_config = yaml.safe_load(f)
global_config = {k: v for k, v in global_config.items() if v} global_config = {k: v for k, v in global_config.items() if v}
except FileNotFoundError: except FileNotFoundError:
print("You have no config file setup! Please use config.yml.sample to setup a valid config file") print("You have no config file setup! Please use config.yml.sample to setup a valid config file")