use safe load

This commit is contained in:
Giulio De Pasquale 2021-06-21 18:17:15 +01:00
parent d3fd8a3839
commit 06aa7cf632

4
app.py
View File

@ -7,7 +7,7 @@ import requests
from dotenv import load_dotenv
from os.path import realpath, dirname
from os import getenv
from yaml import load
from yaml import safe_load
from pathlib import Path
CONFIG_FILE = Path(f"{dirname(realpath(__file__))}/config.yaml")
@ -169,7 +169,7 @@ def main():
print(f"Loading configuration \"{CONFIG_FILE}\"")
with open(CONFIG_FILE, "r") as f:
config_data = load(f.read())
config_data = safe_load(f.read())
if "3060" in config_data and config_data["3060"] == True:
print("[*] Monitoring RTX 3060")