Merge pull request #7969 from Security-Onion-Solutions/fix/helpers-analyzers

Only import yaml module when config is loaded
This commit is contained in:
Jason Ertel
2022-05-18 07:15:32 -04:00
committed by GitHub

View File

@@ -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)