From: Eric Leblond Date: Wed, 5 Dec 2012 17:26:21 +0000 (+0100) Subject: suricatasc: improve output of command result X-Git-Tag: suricata-1.4.1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=345cfc35411204a882b721dfe441a6484889f60c;p=thirdparty%2Fsuricata.git suricatasc: improve output of command result --- diff --git a/scripts/suricatasc/suricatasc.in b/scripts/suricatasc/suricatasc.in index 25083e94d6..31c6175936 100755 --- a/scripts/suricatasc/suricatasc.in +++ b/scripts/suricatasc/suricatasc.in @@ -181,9 +181,11 @@ try: #decode json message if cmdret["return"] == "NOK": - print "Error: %s" % (cmdret["message"]) + print "Error:" + print json.dumps(cmdret["message"], sort_keys=True, indent=4, separators=(',', ': ')) else: - print "Success: %s" % (cmdret["message"]) + print "Success:" + print json.dumps(cmdret["message"], sort_keys=True, indent=4, separators=(',', ': ')) else: print "Unknown command: '%s'" % (command) except KeyboardInterrupt: