From: Jason Ish Date: Wed, 20 Nov 2019 21:36:56 +0000 (-0600) Subject: run: allow an empty test.yaml X-Git-Tag: suricata-6.0.4~367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0320bfb1ad5cac8db5e27a4f799a78b0b6a0c672;p=thirdparty%2Fsuricata-verify.git run: allow an empty test.yaml On an empty test.yaml, make sure the config object is an empty dict, and not None. --- diff --git a/run.py b/run.py index 6d5043c76..b4bbe88ac 100755 --- a/run.py +++ b/run.py @@ -356,6 +356,7 @@ class TestRunner: self.readers = [] # Load the test configuration. + self.config = None self.load_config() self.suricata_config.load_config(self.get_suricata_yaml_path()) @@ -364,7 +365,7 @@ class TestRunner: if os.path.exists(os.path.join(self.directory, "test.yaml")): self.config = yaml.safe_load( open(os.path.join(self.directory, "test.yaml"), "rb")) - else: + if self.config is None: self.config = {} def setup(self):