mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 07:06:13 +01:00
Fix ArchQuery.rpmvercmp if one of its arguments is None
The None argument is always <= than the other argument. We need this in case of a broken/pathological package where version() or release() return None (see vercmp (which calls rpmvercmp)).
This commit is contained in:
parent
5c639db805
commit
a3720c5286
@ -137,6 +137,10 @@ class ArchQuery(packagequery.PackageQuery, packagequery.PackageQueryResult):
|
||||
"""
|
||||
if ver1 == ver2:
|
||||
return 0
|
||||
elif ver1 is None:
|
||||
return -1
|
||||
elif ver2 is None:
|
||||
return 1
|
||||
res = 0
|
||||
while res == 0:
|
||||
# remove all leading non alphanumeric chars
|
||||
|
Loading…
Reference in New Issue
Block a user