From: Jason Ish Date: Tue, 30 Oct 2018 17:33:44 +0000 (-0600) Subject: --test-command: fix call to get output directory X-Git-Tag: 1.0.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e46c9c045c0735f19f1f0f94f5b34e4caf8aed55;p=thirdparty%2Fsuricata-update.git --test-command: fix call to get output directory A custom --test-command was failing due to the wrong usage of getting the output directory, resulting in the call to open failing. Redmine issue: https://redmine.openinfosecfoundation.org/issues/2652 --- diff --git a/suricata/update/main.py b/suricata/update/main.py index 2bdf197..bb435b6 100644 --- a/suricata/update/main.py +++ b/suricata/update/main.py @@ -870,11 +870,11 @@ def test_suricata(suricata_path): test_command)) env = { "SURICATA_PATH": suricata_path, - "OUTPUT_DIR": config.get("output"), + "OUTPUT_DIR": config.get_output_dir(), } if not config.get("no-merge"): env["OUTPUT_FILENAME"] = os.path.join( - config.get("output"), DEFAULT_OUTPUT_RULE_FILENAME) + config.get_output_dir(), DEFAULT_OUTPUT_RULE_FILENAME) rc = subprocess.Popen(test_command, shell=True, env=env).wait() if rc != 0: return False