Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def send(self, metrics):
"""Send the metrics to zabbix server.
:type metrics: list
:param metrics: List of :class:`zabbix.sender.ZabbixMetric` to send
to Zabbix
:rtype: :class:`pyzabbix.sender.ZabbixResponse`
:return: Parsed response from Zabbix Server
"""
result = ZabbixResponse()
for m in range(0, len(metrics), self.chunk_size):
result.parse(self._chunk_send(metrics[m:m + self.chunk_size]))
return result