mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-04 07:33:31 +00:00
[Blocklist] Fix detecting compression type on Py3
The magic number is in bytes so ensure bytes in COMPRESSION_TYPES
This commit is contained in:
parent
a01481b26f
commit
6233e5c844
@ -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}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user