-
Notifications
You must be signed in to change notification settings - Fork 40
error if --inputs string contains pipes #38
Description
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"