Skip to content
This repository was archived by the owner on Mar 12, 2019. It is now read-only.

error if --inputs string contains pipes #38

@senorsmile

Description

@senorsmile

EDIT: I am using the most recent version 0.6.0 of hipsaint

here's an example

--inputs="$SERVICEDESC|$HOSTALIAS|$LONGDATETIME|$NOTIFICATIONTYPE|$HOSTADDRESS|$SERVICESTATE|$SERVICEOUTPUT"

where
SERVICEDESC="Host | Section 1"

This causes the error:

Traceback (most recent call last):
File "/usr/local/bin/hipsaint", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/hipsaint/bin/commands.py", line 78, in main
msg.deliver_payload()
File "/usr/local/lib/python2.7/dist-packages/hipsaint/messages.py", line 58, in deliver_payload_v1
message_body = self.render_message()
File "/usr/local/lib/python2.7/dist-packages/hipsaint/messages.py", line 146, in render_message
template_context = self.get_service_context()
File "/usr/local/lib/python2.7/dist-packages/hipsaint/messages.py", line 126, in get_service_context
servicedesc, hostalias, timestamp, ntype, hostaddress, state, serviceoutput = self.inputs_list
ValueError: too many values to unpack

Putting extra quotes doesn't help:
--inputs="'$SERVICEDESC'|$HOSTALIAS|$LONGDATETIME|$NOTIFICATIONTYPE|$HOSTADDRESS|$SERVICESTATE|$SERVICEOUTPUT"

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