mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 07:24:09 +00:00
Invert PY2/PY3 test for conditional read1() definition
This commit is contained in:
parent
2b5245839c
commit
29ff84a792
@ -16,12 +16,12 @@ import six
|
||||
# works here but is only available from Python>=3.3
|
||||
# - scrapy does not support Python 3.2
|
||||
# - Python 2.7 GzipFile works fine with standard read() + extrabuf
|
||||
if six.PY3:
|
||||
def read1(gzf, size=-1):
|
||||
return gzf.read1(size)
|
||||
else:
|
||||
if six.PY2:
|
||||
def read1(gzf, size=-1):
|
||||
return gzf.read(size)
|
||||
else:
|
||||
def read1(gzf, size=-1):
|
||||
return gzf.read1(size)
|
||||
|
||||
|
||||
def gunzip(data):
|
||||
|
Loading…
x
Reference in New Issue
Block a user