]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
--test-command: fix call to get output directory
authorJason Ish <ish@unx.ca>
Tue, 30 Oct 2018 17:33:44 +0000 (11:33 -0600)
committerJason Ish <ish@unx.ca>
Tue, 30 Oct 2018 17:33:44 +0000 (11:33 -0600)
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

suricata/update/main.py

index 2bdf197c61366becf79e822ed3ecfc848150236f..bb435b6f3be74bae7033214172d17fe3580f88a6 100644 (file)
@@ -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