Skip to content

Commit

Permalink
Fix YAML load errors in Nav Script
Browse files Browse the repository at this point in the history
alexiacrumpton authored Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 55b59f7 commit 34360ca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/generate_attack_nav_layer.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,12 @@

# Get all analytics and load as list of dicts
analytics_files = glob.glob(path.join(path.dirname(__file__), "..", "analytics", "*.yaml"))
analytics = [yaml.load(open(analytic_file,encoding='utf-8').read()) for analytic_file in analytics_files]
analytics = []
for analytic_file in analytics_files:
with open(analytic_file) as af:
files = yaml.safe_load(af)
analytics.append(files)
#analytics = [yaml.load(open(analytic_file,encoding='utf-8').read()) for analytic_file in analytics_files]

def addMapping(technique, name, attack_mappings):
if technique not in attack_mappings:

0 comments on commit 34360ca

Please sign in to comment.