mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 13:18:42 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user