Skip to content

Commit

Permalink
list_all_bots: use bot name as module
Browse files Browse the repository at this point in the history
Fix check for bot executable in $PATH by using the bot name instead of the import path

fixes certtools#2559
  • Loading branch information
sebix committed Feb 8, 2025
1 parent c8b9785 commit ac3c227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- comment
SPDX-FileCopyrightText: 2015-2024 Sebastian Wagner
SPDX-FileCopyrightText: 2015-2025 Sebastian Wagner
SPDX-License-Identifier: AGPL-3.0-or-later
-->

Expand All @@ -13,6 +13,7 @@

### Core
- Python 3.8 or newer is required (PR#2541 by Sebastian Wagner).
- `intelmq.lib.utils.list_all_bots`/`intelmqctl check`: Fix check for bot executable in $PATH by using the bot name instead of the import path (fixes #2559, PR#2564 by Sebastian Wagner).

### Development

Expand Down
2 changes: 1 addition & 1 deletion intelmq/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ def list_all_bots() -> dict:
name = name.replace(bot_type, '')

bots[module_name.split('.')[2].capitalize()[:-1]][name] = {
"module": mod.__name__,
"module": bot.name,
"description": "Missing description" if not getattr(mod.BOT, '__doc__', None) else textwrap.dedent(mod.BOT.__doc__).strip(),
"parameters": keys,
}
Expand Down

0 comments on commit ac3c227

Please sign in to comment.