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
commit11e066b12768c789dbfd876447fbf52a322f7b41 (patch)
tree829450746b808df689b0a470ed5a0d83f96e977d /lib
parentf7fc8710b09c3a2a3df041784cc8012359aba5c7 (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