diff --git a/CHANGELOG.md b/CHANGELOG.md index ad1ab29b0..7b31d7035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ #### Parsers - `intelmq.bots.parsers.shadowserver._config`: - fix error message formatting if schema file is absent (PR#2528 by Sebastian Wagner). +- `intelmq.bots.parsers.shadowserver.parser`: + - Fix to avoid schema download if not configured #2530. #### Experts diff --git a/intelmq/bots/parsers/shadowserver/parser.py b/intelmq/bots/parsers/shadowserver/parser.py index 59e7abf63..e2249a431 100644 --- a/intelmq/bots/parsers/shadowserver/parser.py +++ b/intelmq/bots/parsers/shadowserver/parser.py @@ -261,15 +261,18 @@ def run(cls, parsed_args=None): else: logger.setLevel('ERROR') config.set_logger(logger) - if config.update_schema(): - runtime_conf = utils.get_bots_settings() - try: - ctl = IntelMQController() - for bot in runtime_conf: - if runtime_conf[bot]["module"] == __name__: - ctl.bot_reload(bot) - except Exception as e: - logger.error("Failed to signal bot: %r" % str(e)) + runtime_conf = utils.get_bots_settings() + try: + ctl = IntelMQController() + bots = [] + for bot in runtime_conf: + if runtime_conf[bot]["module"] == __name__: + bots.append(bot) + if len(bots) and config.update_schema(): + for bot in bots: + ctl.bot_reload(bot) + except Exception as e: + logger.error("Failed to update: %r" % str(e)) else: super().run(parsed_args=parsed_args)