Only import yaml module when config is loaded

This commit is contained in:
Wes Lambert
2022-05-18 02:07:39 +00:00
parent 94ca3ddbda
commit 429ccb2dcc

View File

@@ -1,7 +1,6 @@
import json import json
import os import os
import sys import sys
import yaml
def checkSupportedType(meta, artifact_type): def checkSupportedType(meta, artifact_type):
@@ -24,5 +23,6 @@ def loadMetadata(file):
def loadConfig(path): def loadConfig(path):
import yaml
with open(str(path), "r") as conffile: with open(str(path), "r") as conffile:
return yaml.safe_load(conffile) return yaml.safe_load(conffile)