Skip to content

Return value is True even if value is not actually sent #5

@gmichels

Description

@gmichels

Hey,

The function for sending data only evaluates if the response from the Zabbix server was valid or not:

if resp.get('response') != 'success':

There are cases where the response is successful though actually sending the value failed:

[Dbg]>>> print resp.get('info')
processed: 0; failed: 1; total: 1; seconds spent: 0.000022
[Dbg]>>> print resp.get('response')
success

Maybe you could add another condition for the evaluation, something as simple as:

if resp.get('response') != 'success' or resp.get('info').find('failed: 1') != -1:

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions