Skip to content

Commit 14d1b0c

Browse files
Sebastian Wagnerwaldbauer-certat
authored andcommitted
BUG: lib/utils: fix check on bot docstring
make it more robust if the docstring does not exist
1 parent e4ce2e0 commit 14d1b0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intelmq/lib/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def list_all_bots() -> dict:
849849

850850
bots[file.parts[2].capitalize()[:-1]][name] = {
851851
"module": mod.__name__,
852-
"description": "Missing description" if not hasattr(mod.BOT, '__doc__') else textwrap.dedent(mod.BOT.__doc__),
852+
"description": "Missing description" if not getattr(mod.BOT, '__doc__', None) else textwrap.dedent(mod.BOT.__doc__),
853853
"parameters": keys,
854854
}
855855
return bots

0 commit comments

Comments
 (0)