1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-09 22:36:14 +01: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') f = open(filename, 'rb')
magic = f.read(7) magic = f.read(7)
f.seek(0) f.seek(0)
if magic[:4] == '\xed\xab\xee\xdb': if magic[:4] == b'\xed\xab\xee\xdb':
from . import rpmquery from . import rpmquery
f.close() f.close()
return rpmquery.RpmQuery.queryhdrmd5(filename) return rpmquery.RpmQuery.queryhdrmd5(filename)