diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-05 20:39:37 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-05 21:23:25 +0200 |
commit | 11e066b12768c789dbfd876447fbf52a322f7b41 (patch) | |
tree | 829450746b808df689b0a470ed5a0d83f96e977d | |
parent | f7fc8710b09c3a2a3df041784cc8012359aba5c7 (diff) |
security_db: don't use cmp to compare versions
-rw-r--r-- | lib/python/security_db.py | 6 |
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") |