From a9176cf1269e96125505fdffe03d07b368143bca Mon Sep 17 00:00:00 2001 From: Alexander Gozman Date: Tue, 16 Jun 2015 18:12:01 +0300 Subject: [PATCH] suricatasc: remove "u" prefix when printing JSON output. If we want to parse suricatasc's output, python's unicode prefix should be removed to make JSON parsers happy. --- scripts/suricatasc/suricatasc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/suricatasc/suricatasc.in b/scripts/suricatasc/suricatasc.in index 4b44204bcf..6c33ba3237 100755 --- a/scripts/suricatasc/suricatasc.in +++ b/scripts/suricatasc/suricatasc.in @@ -42,7 +42,7 @@ except SuricataReturnException as err: if args.command: (command, arguments) = sc.parse_command(args.command) res = sc.send_command(command, arguments) - print(res) + print(json.dumps(res)) sc.close() if res['return'] == 'OK': sys.exit(0)