Fix datatype and encoding for yum spider

This commit is contained in:
Magnus Hagander
2019-01-26 16:45:41 +01:00
parent 1f34abf878
commit b74fa2146a
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ def uploadyum(request):
return HttpServerError(request, "Invalid client address")
# We have the data in request.body. Attempt to load it as
# json to ensure correct format.
json.loads(request.body)
json.loads(request.body.decode('utf8'))
# Next, check if it's the same as the current file
if os.path.isfile(settings.YUM_JSON):

View File

@ -80,7 +80,7 @@ if __name__ == "__main__":
if pinfo['p'] == familypath and pinfo['f'] == shortdist:
if p not in reporpms[v]:
reporpms[v][p] = {}
reporpms[v][p][arch] = max(ver, reporpms[v][p].get(arch, 0))
reporpms[v][p][arch] = max(int(ver), int(reporpms[v][p].get(arch, 0)))
platforms[p]['found'] = True
break
else: