summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-08-05 20:39:37 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-08-05 21:23:25 +0200
commit93f3894aa76f7613f2ecd6c3895afb808159e974 (patch)
treeeaa2011704403f52f3623d2cea45e82a8b6fcd25 /lib
parent8bc683365dbde46945f0cb41ab66cf514aee6235 (diff)
security_db: don't use cmp to compare versions
Diffstat (limited to 'lib')
-rw-r--r--lib/python/security_db.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/python/security_db.py b/lib/python/security_db.py
index 4f9597a376..18a77a1a8d 100644
--- a/lib/python/security_db.py
+++ b/lib/python/security_db.py
@@ -2070,10 +2070,8 @@ class DB:
AND sp.release = binary_packages.release
AND sp.archive = binary_packages.archive
AND sp.version <> binary_packages.source_version"""):
- relation = cmp(debian_support.Version(version),
- debian_support.Version(source_version))
- assert relation != 0
- if relation <= 0:
+ assert debian_support.Version(version) != debian_support.Version(source_version)
+ if debian_support.Version(version) <= debian_support.Version(source_version):
print("error: binary package is older than source package")
else:
print("warning: binary package is newer than source package")

© 2014-2024 Faster IT GmbH | imprint | privacy policy