suricatasc: improve output of command result

pull/299/head
Eric Leblond 13 years ago committed by Victor Julien
parent 9fc996e4df
commit 345cfc3541

@ -181,9 +181,11 @@ try:
#decode json message #decode json message
if cmdret["return"] == "NOK": if cmdret["return"] == "NOK":
print "Error: %s" % (cmdret["message"]) print "Error:"
print json.dumps(cmdret["message"], sort_keys=True, indent=4, separators=(',', ': '))
else: else:
print "Success: %s" % (cmdret["message"]) print "Success:"
print json.dumps(cmdret["message"], sort_keys=True, indent=4, separators=(',', ': '))
else: else:
print "Unknown command: '%s'" % (command) print "Unknown command: '%s'" % (command)
except KeyboardInterrupt: except KeyboardInterrupt:

Loading…
Cancel
Save