# Buggy code
def send_message(self, *messages):
    for message in messages:
        if not message:
            self.logger.warning(
                "Ignoring empty message at sending. Possible bug in bot."
            )
            continue
        if not self.__destination_pipeline:
            raise exceptions.ConfigurationError(
                "pipeline", "No destination pipeline given, but needed"
            )
            self.stop()

        self.logger.debug("Sending message.")
        self.__message_counter += 1
        if not self.__message_counter_start:
            self.__message_counter_start = datetime.datetime.now()
        if (
            self.__message_counter % self.parameters.log_processed_messages_count == 0
            or datetime.datetime.now() - self.__message_counter_start
            > self.parameters.log_processed_messages_seconds
        ):
            self.logger.info(
                "Processed %d messages since last logging.", self.__message_counter
            )
            self.__message_counter = 0
            self.__message_counter_start = datetime.datetime.now()

        raw_message = libmessage.MessageFactory.serialize(message)
        self.__destination_pipeline.send(raw_message)


# Traceback (intelmq.lib.exceptions.KeyExists)
intelmqctl run abusech-feodo-domains-collector message send "{\"feed.accuracy\": 100.0, \"feed.name\": \"Abuse.ch Feodo Domains\", \"raw\": \"IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBGZW9kbyBEb21haW4gQmxvY2tsaXN0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMKIyBHZW5lcmF0ZWQgb24gMjAxNy0wOC0xNyAxMTo0NjoyNSBVVEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMKIyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMKIyBGb3IgcXVlc3Rpb25zIHBsZWFzZSByZWZlciB0byBodHRwczovL2Zlb2RvdHJhY2tlci5hYnVzZS5jaC9ibG9ja2xpc3QvICMKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBTVEFSVAojIEVORCAoMCBlbnRyaWVzKQo=\", \"__type\": \"Report\", \"feed.url\": \"https://feodotracker.abuse.ch/blocklist/?download=domainblocklist\", \"time.observation\": \"2017-08-17T11:46:25+00:00\", \"feed.provider\": \"Abuse.ch\"}"
/usr/lib64/python3.4/importlib/_bootstrap.py:579: ImportWarning: Not importing directory /usr/lib64/python3.4/site-packages/zope: missing __init__
_warnings.warn(msg.format(portions[0]), ImportWarning)
/usr/lib64/python3.4/importlib/_bootstrap.py:579: ImportWarning: Not importing directory /usr/lib64/python3.4/site-packages/mpl_toolkits: missing __init__
_warnings.warn(msg.format(portions[0]), ImportWarning)
/usr/lib64/python3.4/importlib/_bootstrap.py:579: ImportWarning: Not importing directory /usr/lib/python3.4/site-packages/logilab: missing __init__
_warnings.warn(msg.format(portions[0]), ImportWarning)
intelmqctl: Starting abusech-feodo-domains-collector...
Traceback (most recent call last):
File "/usr/local/bin/intelmqctl", line 9, in <module>
load_entry_point('intelmq==1.0.0', 'console_scripts', 'intelmqctl')()
File "/home/sebastian/dev/intelmq/intelmq/bin/intelmqctl.py", line 916, in main
return x.run()
File "/home/sebastian/dev/intelmq/intelmq/bin/intelmqctl.py", line 549, in run
results = args.func(**args_dict)
File "/home/sebastian/dev/intelmq/intelmq/bin/intelmqctl.py", line 559, in bot_run
return self.bot_process_manager.bot_run(**kwargs)
File "/home/sebastian/dev/intelmq/intelmq/bin/intelmqctl.py", line 142, in bot_run
console_type, dryrun, message_action_kind, msg)
File "/home/sebastian/dev/intelmq/intelmq/lib/bot_debugger.py", line 55, in __init__
self._message(message_kind, msg)
File "/home/sebastian/dev/intelmq/intelmq/lib/bot_debugger.py", line 108, in _message
self.instance.send_message(msg)
File "/home/sebastian/dev/intelmq/intelmq/lib/bot.py", line 723, in send_message
super(CollectorBot, self).send_message(*messages)
File "/home/sebastian/dev/intelmq/intelmq/lib/bot.py", line 710, in __add_report_fields
report.add("feed.name", self.parameters.feed)
File "/home/sebastian/dev/intelmq/intelmq/lib/message.py", line 191, in add
raise exceptions.KeyExists(key)
intelmq.lib.exceptions.KeyExists: key 'feed.name' already exists

# Fixed code
def send_message(self, *messages, auto_add=None):
    """
    Parameters:
        messages: Instances of intelmq.lib.message.Message class
        auto_add: ignored
    """
    for message in messages:
        if not message:
            self.logger.warning(
                "Ignoring empty message at sending. Possible bug in bot."
            )
            continue
        if not self.__destination_pipeline:
            raise exceptions.ConfigurationError(
                "pipeline", "No destination pipeline given, but needed"
            )
            self.stop()

        self.logger.debug("Sending message.")
        self.__message_counter += 1
        if not self.__message_counter_start:
            self.__message_counter_start = datetime.datetime.now()
        if (
            self.__message_counter % self.parameters.log_processed_messages_count == 0
            or datetime.datetime.now() - self.__message_counter_start
            > self.parameters.log_processed_messages_seconds
        ):
            self.logger.info(
                "Processed %d messages since last logging.", self.__message_counter
            )
            self.__message_counter = 0
            self.__message_counter_start = datetime.datetime.now()

        raw_message = libmessage.MessageFactory.serialize(message)
        self.__destination_pipeline.send(raw_message)