From ade0bf3bf68070a47348a6a110a6fd361dfdae99 Mon Sep 17 00:00:00 2001 From: Danny Leung Date: Mon, 1 Nov 2021 22:56:37 -0700 Subject: [PATCH] PEX-33: remove chalice import --- bin/yaml_to_json.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/yaml_to_json.py b/bin/yaml_to_json.py index 0f2ca3931d..1e64aa0e29 100644 --- a/bin/yaml_to_json.py +++ b/bin/yaml_to_json.py @@ -1,5 +1,5 @@ import yaml, json -from chalice import BadRequestError +#from chalice import BadRequestError import csv from io import StringIO import re @@ -85,7 +85,8 @@ class Yaml2Json(): try: file = yaml.safe_load(stream) except: - raise BadRequestError('file ' + file_path + ' can not be loaded.') + raise + #raise BadRequestError('file ' + file_path + ' can not be loaded.') # enrich story with detections and responses if type == 'stories': @@ -161,7 +162,8 @@ class Yaml2Json(): for row in reader: mitre_enrichment[row['mitre_id']] = [row['technique'], row['tactics'].split('|'), row['groups'].split('|')] except: - raise BadRequestError('mitre enrichment lookup can not be loaded.') + raise + #raise BadRequestError('mitre enrichment lookup can not be loaded.') return mitre_enrichment