[Blocklist] Fix detecting compression type on Py3

The magic number is in bytes so ensure bytes in COMPRESSION_TYPES
This commit is contained in:
Calum Lind 2018-11-01 20:49:53 +00:00
parent a01481b26f
commit 6233e5c844

View File

@ -12,7 +12,7 @@ from __future__ import unicode_literals
from .decompressers import BZipped2, GZipped, Zipped
from .readers import EmuleReader, PeerGuardianReader, SafePeerReader
COMPRESSION_TYPES = {'PK': 'Zip', '\x1f\x8b': 'GZip', 'BZ': 'BZip2'}
COMPRESSION_TYPES = {b'PK': 'Zip', b'\x1f\x8b': 'GZip', b'BZ': 'BZip2'}
DECOMPRESSERS = {'Zip': Zipped, 'GZip': GZipped, 'BZip2': BZipped2}