mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-29 03:06:15 +01:00
[python3] magic is now a bytestring in python3
This commit is contained in:
parent
7bd9ca485d
commit
2d5a3aeb3b
@ -60,18 +60,18 @@ class PackageQuery:
|
|||||||
f.seek(0)
|
f.seek(0)
|
||||||
extra_tags = ()
|
extra_tags = ()
|
||||||
pkgquery = None
|
pkgquery = None
|
||||||
if magic[:4] == '\xed\xab\xee\xdb':
|
if magic[:4] == b'\xed\xab\xee\xdb':
|
||||||
from . import rpmquery
|
from . import rpmquery
|
||||||
pkgquery = rpmquery.RpmQuery(f)
|
pkgquery = rpmquery.RpmQuery(f)
|
||||||
extra_tags = extra_rpmtags
|
extra_tags = extra_rpmtags
|
||||||
elif magic == '!<arch>':
|
elif magic == b'!<arch>':
|
||||||
from . import debquery
|
from . import debquery
|
||||||
pkgquery = debquery.DebQuery(f)
|
pkgquery = debquery.DebQuery(f)
|
||||||
extra_tags = extra_debtags
|
extra_tags = extra_debtags
|
||||||
elif magic[:5] == '<?xml':
|
elif magic[:5] == b'<?xml':
|
||||||
f.close()
|
f.close()
|
||||||
return None
|
return None
|
||||||
elif magic[:5] == '\375\067zXZ' or magic[:2] == '\037\213':
|
elif magic[:5] == b'\375\067zXZ' or magic[:2] == b'\037\213':
|
||||||
from . import archquery
|
from . import archquery
|
||||||
pkgquery = archquery.ArchQuery(f)
|
pkgquery = archquery.ArchQuery(f)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user