use safe load
This commit is contained in:
parent
d3fd8a3839
commit
06aa7cf632
4
app.py
4
app.py
@ -7,7 +7,7 @@ import requests
|
|||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from os.path import realpath, dirname
|
from os.path import realpath, dirname
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from yaml import load
|
from yaml import safe_load
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
CONFIG_FILE = Path(f"{dirname(realpath(__file__))}/config.yaml")
|
CONFIG_FILE = Path(f"{dirname(realpath(__file__))}/config.yaml")
|
||||||
@ -169,7 +169,7 @@ def main():
|
|||||||
print(f"Loading configuration \"{CONFIG_FILE}\"")
|
print(f"Loading configuration \"{CONFIG_FILE}\"")
|
||||||
|
|
||||||
with open(CONFIG_FILE, "r") as f:
|
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:
|
if "3060" in config_data and config_data["3060"] == True:
|
||||||
print("[*] Monitoring RTX 3060")
|
print("[*] Monitoring RTX 3060")
|
||||||
|
Loading…
Reference in New Issue
Block a user