]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
script/dnp3-gen.py: update for newer versions of Python
authorJason Ish <jason.ish@oisf.net>
Wed, 26 Mar 2025 18:25:58 +0000 (12:25 -0600)
committerJason Ish <jason.ish@oisf.net>
Thu, 27 Mar 2025 14:31:44 +0000 (08:31 -0600)
More recent yaml loaders require the loader as an argument.

scripts/dnp3-gen/dnp3-gen.py

index 70a70c76e7e56c40d7a973e14f3855e9629b6d6a..ccdc122db569a24e22c8226fbd04072cb7150e6d 100755 (executable)
@@ -710,7 +710,7 @@ def main():
         print("error: jinja2 v2.10 or great required")
         return 1
 
-    definitions = yaml.load(open("scripts/dnp3-gen/dnp3-objects.yaml"))
+    definitions = yaml.load(open("scripts/dnp3-gen/dnp3-objects.yaml"), yaml.Loader)
     print("Loaded %s objects." % (len(definitions["objects"])))
     definitions["objects"] = map(preprocess_object, definitions["objects"])