Skip to content

Commit

Permalink
Merge pull request #1220 from StamusNetworks/host_id_traceback
Browse files Browse the repository at this point in the history
StamusNetworks: fix error on empty network info
  • Loading branch information
jeromeleonard authored Jan 18, 2024
2 parents c18d790 + e10ef9b commit f732451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analyzers/StamusNetworks/hostid_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def artifacts(self, raw):
host['host'],
tags=tags))
net_info = raw['host_id'].get('net_info', [])
if len(net_info) > -1:
if len(net_info) > 0:
net_info = sorted(net_info, key=lambda k: k['last_seen'], reverse=True)[0]['agg']
tags=["network-info"]
artifacts.append(
Expand Down

0 comments on commit f732451

Please sign in to comment.