mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 04:23:01 +02:00
BrowserCache: Add comment about py2 and gzip.decompress
This commit is contained in:
parent
507910f5da
commit
18ce6e6fba
1 changed files with 4 additions and 0 deletions
|
|
@ -185,6 +185,10 @@ class BaseBrowserCache(object):
|
|||
def decompress(self, encoding, data):
|
||||
encoding = ensure_text(encoding)
|
||||
if encoding == 'gzip':
|
||||
## XXX py2 doesn't have gzip.decompress() and
|
||||
## zlib.decompress() isn't compatible. Ran into once, but
|
||||
## it's the site that choses the encoding and on reload,
|
||||
## got brotli instead.
|
||||
return gzip.decompress(data)
|
||||
elif encoding == 'br':
|
||||
return brotli.decompress(data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue