From: Jeff Lucovsky Date: Fri, 2 Dec 2022 14:27:22 +0000 (-0500) Subject: run: Improve 'lt' version checking X-Git-Tag: suricata-6.0.13~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=772ccc16897f9a38c73c5ba9926a112f2ba2ec21;p=thirdparty%2Fsuricata-verify.git run: Improve 'lt' version checking This commit improves version checking for the 'less than' case the Suricata version exceeds the `lt-version` value. E.g., when Suricata is 7.0.0 and the lt-version specifies 6.0.1 --- diff --git a/run.py b/run.py index 8f8d8ead4..67d45533a 100755 --- a/run.py +++ b/run.py @@ -256,7 +256,9 @@ class Version: def is_lt(self, v1, v2): """Return True if v1 is less than v2.""" - if v1.major < v2.major: + if v1.major > v2.major: + return False + elif v1.major < v2.major: return True elif v1.minor < v2.minor: return True