1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-14 01:26:23 +01:00

Merge pull request #522 from lethliel/python3_repodata_module

[python3] fix epoch encoding in repodata.py
This commit is contained in:
Marco Strigl 2019-04-15 15:07:50 +02:00 committed by GitHub
commit 41ced89fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,13 +177,13 @@ class RepoDataQueryResult(osc.util.packagequery.PackageQueryResult):
return None
def vercmp(self, other):
res = osc.util.rpmquery.RpmQuery.rpmvercmp(str(self.epoch()), str(other.epoch()))
res = osc.util.rpmquery.RpmQuery.rpmvercmp(str(self.epoch()).encode(), str(other.epoch()).encode())
if res != 0:
return res
res = osc.util.rpmquery.RpmQuery.rpmvercmp(self.version(), other.version())
res = osc.util.rpmquery.RpmQuery.rpmvercmp(self.version().encode(), other.version().encode())
if res != 0:
return res
res = osc.util.rpmquery.RpmQuery.rpmvercmp(self.release(), other.release())
res = osc.util.rpmquery.RpmQuery.rpmvercmp(self.release().encode(), other.release().encode())
return res
def version(self):