From 9d43b7ec89eb2476838f919eee2f51ebd16d04db Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Tue, 5 Jul 2022 16:21:27 -0400 Subject: [PATCH] Rollback string manipulation in favor of fixed unit tests --- salt/sensoroni/files/analyzers/localfile/localfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/sensoroni/files/analyzers/localfile/localfile.py b/salt/sensoroni/files/analyzers/localfile/localfile.py index 0924a98cc..5538d6a93 100755 --- a/salt/sensoroni/files/analyzers/localfile/localfile.py +++ b/salt/sensoroni/files/analyzers/localfile/localfile.py @@ -17,7 +17,7 @@ def searchFile(artifact, csvfiles): dir = os.path.dirname(os.path.realpath(__file__)) found = [] for f in csvfiles: - filename = dir + "/" + f.strip("'") + filename = dir + "/" + f with open(filename, "r") as csvfile: csvdata = csv.DictReader(csvfile) for row in csvdata: @@ -58,7 +58,7 @@ def analyze(conf, input): meta = helpers.loadMetadata(__file__) data = helpers.parseArtifact(input) helpers.checkSupportedType(meta, data["artifactType"]) - search = searchFile(data["value"], conf['file_path'].strip("[]").split(', ')) + search = searchFile(data["value"], conf['file_path']) results = prepareResults(search) return results