mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-29 03:06:15 +01:00
Merge branch 'fix_querymd5hdr' of https://github.com/adrianschroeter/osc
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:
commit
42e46ccaec
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user