1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00
Fix rpm magic check in PackageQuery.queryhdrmd5 (str vs bytes).
Note: if a buildinfo's bdep element contains a hdrmd5, osc will refuse
the build in a non-rpm case.
This commit is contained in:
Marcus Huewe 2021-10-13 13:15:59 +02:00
commit 42e46ccaec

View File

@ -87,7 +87,7 @@ class PackageQuery:
f = open(filename, 'rb')
magic = f.read(7)
f.seek(0)
if magic[:4] == '\xed\xab\xee\xdb':
if magic[:4] == b'\xed\xab\xee\xdb':
from . import rpmquery
f.close()
return rpmquery.RpmQuery.queryhdrmd5(filename)