]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
rules: default rev to 0 for rules without a rev
authorJason Ish <ish@unx.ca>
Mon, 11 Feb 2019 17:19:53 +0000 (11:19 -0600)
committerJason Ish <ish@unx.ca>
Wed, 13 Feb 2019 14:53:08 +0000 (08:53 -0600)
Comparisons between none types in Python 2 were allowed, Python 3
throws an exception here causing rules without a rev to break
suricata-update.

suricata/update/rule.py

index 8444e90f832dd9e2fed670c97acf8e864d0a0aac..91df0c802dbd2ad91b7625ba2f6e4034dbc04987 100644 (file)
@@ -97,7 +97,7 @@ class Rule(dict):
         self["group"] = group
         self["gid"] = 1
         self["sid"] = None
-        self["rev"] = None
+        self["rev"] = 0
         self["msg"] = None
         self["flowbits"] = []
         self["metadata"] = []