Permalink
Browse files

Merge pull request #175 from ReAzem/find_command_file_fails

Use livestatus if find_command_file fails
  • Loading branch information...
palli committed Nov 22, 2014
2 parents b220b03 + cd3a123 commit 325d15a6733ce5aaba0b92a9d5dec99559cc70ec
Showing with 2 additions and 2 deletions.
  1. +2 −2 pynag/Control/Command/__init__.py
@@ -79,12 +79,12 @@ def send_command(command_id, command_file=None, timestamp=0, *args):
"""
if not timestamp or timestamp == 0:
timestamp = time.time()
if not command_file:
command_file = find_command_file()
command_arguments = map(str, args)
command_arguments = ";".join(command_arguments)
command_string = "[%s] %s;%s" % (timestamp, command_id, command_arguments)
try:
if not command_file:
command_file = find_command_file()
_write_to_command_file(command_file, command_string)
except Exception:
_write_to_livestatus(command_string)

0 comments on commit 325d15a

Please sign in to comment.