Skip to content

Commit

Permalink
BUG: ctl: Quick fix to run ParserBots
Browse files Browse the repository at this point in the history
fixes #594
fixes #607

Signed-off-by: Sebastian Wagner <[email protected]>
  • Loading branch information
sebix committed Jul 25, 2016
1 parent c01f8e2 commit 506d593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion intelmq/bin/intelmqctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@ def bot_run(self, bot_id):
return 'error'
else:
module = importlib.import_module(bot_module)
# TODO: Search for bot class is dirty (but works)
botname = [name for name in dir(module)
if hasattr(getattr(module, name), 'process') and
name.endswith('Bot')][0]
name.endswith('Bot') and
name != 'ParserBot'][0]
bot = getattr(module, botname)
instance = bot(bot_id)
instance.start()
Expand Down

0 comments on commit 506d593

Please sign in to comment.