Skip to content

Commit

Permalink
Fixes #2471.
Browse files Browse the repository at this point in the history
  • Loading branch information
gethvi committed Mar 5, 2024
1 parent 51500be commit 0c46490
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions intelmq/lib/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def v110_shadowserver_feednames(configuration, harmonization, dry_run, **kwargs)
if bot_id == 'global':
continue
if bot["module"] == "intelmq.bots.parsers.shadowserver.parser":
if bot["parameters"]["feedname"] in mapping:
feedname = bot.get("parameters", {}).get("feedname")
if feedname and feedname in mapping:
changed = True
bot["parameters"]["feedname"] = mapping[bot["parameters"]["feedname"]]

Expand Down Expand Up @@ -760,7 +761,7 @@ def v310_shadowserver_feednames(configuration, harmonization, dry_run, **kwargs)
if bot_id == 'global':
continue
if bot["module"] == "intelmq.bots.parsers.shadowserver.parser":
if bot["parameters"]["feedname"] in legacy:
if bot["parameters"].get("feedname") and bot["parameters"]["feedname"] in legacy:
names.append(bot["parameters"]["feedname"])
return 'A discontinued feed has been found and must be removed %s' % ', '.join(names) if names else changed, configuration, harmonization

Expand Down

0 comments on commit 0c46490

Please sign in to comment.