Skip to content

Commit

Permalink
Update es_index_export.py
Browse files Browse the repository at this point in the history
try/except block around DN keys append
  • Loading branch information
wbnod committed Oct 27, 2021
1 parent 89a48db commit 6e3aa94
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions scripts/es_index_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,22 @@ def __init__(self):
dr_confidence = 'not defined'


for dn in alert_dns:
if dn['title'] not in dn_titles:
dn_titles.append(dn['title'])
if dn['category'] not in dn_categories:
dn_categories.append(dn['category'])
if dn['platform'] not in dn_platforms:
dn_platforms.append(dn['platform'])
if dn['type'] not in dn_types:
dn_types.append(dn['type'])
if dn['channel'] not in dn_channels:
dn_channels.append(dn['channel'])
if dn['provider'] not in dn_providers:
dn_providers.append(dn['provider'])
try:
for dn in alert_dns:
if dn['title'] not in dn_titles:
dn_titles.append(dn['title'])
if dn['category'] not in dn_categories:
dn_categories.append(dn['category'])
if dn['platform'] not in dn_platforms:
dn_platforms.append(dn['platform'])
if dn['type'] not in dn_types:
dn_types.append(dn['type'])
if dn['channel'] not in dn_channels:
dn_channels.append(dn['channel'])
if dn['provider'] not in dn_providers:
dn_providers.append(dn['provider'])
except:
pass

for lp in logging_policies:
if lp['title'] not in lp_titles:
Expand Down

1 comment on commit 6e3aa94

@wbnod
Copy link
Owner Author

@wbnod wbnod commented on 6e3aa94 Oct 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.