From 429ccb2dccf11126ed1df2e253892789cf1d3f70 Mon Sep 17 00:00:00 2001 From: Wes Lambert Date: Wed, 18 May 2022 02:07:39 +0000 Subject: [PATCH] Only import yaml module when config is loaded --- salt/sensoroni/files/analyzers/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/sensoroni/files/analyzers/helpers.py b/salt/sensoroni/files/analyzers/helpers.py index f4ef4a1e6..903e2373b 100644 --- a/salt/sensoroni/files/analyzers/helpers.py +++ b/salt/sensoroni/files/analyzers/helpers.py @@ -1,7 +1,6 @@ import json import os import sys -import yaml def checkSupportedType(meta, artifact_type): @@ -24,5 +23,6 @@ def loadMetadata(file): def loadConfig(path): + import yaml with open(str(path), "r") as conffile: return yaml.safe_load(conffile)