Skip to content

Commit f5b92d2

Browse files
committed
BF: Typo in _gzip_open was preventing max_read_chunk from having any effect.
1 parent ef74d94 commit f5b92d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nibabel/openers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ def _gzip_open(fileish, mode='rb', compresslevel=9):
9090
else:
9191
gzip_file = BufferedGzipFile(fileish, mode, compresslevel)
9292

93-
# Speedup for #209; attribute not present in in Python 3.5
94-
# open gzip files with faster reads on large files using larger
95-
# See https://github.com/nipy/nibabel/pull/210 for discussion
96-
if hasattr(gzip_file, 'max_chunk_read'):
93+
# Speedup for #209, for versions of python < 3.5. Open gzip files with
94+
# faster reads on large files using a larger read buffer. See
95+
# https://github.com/nipy/nibabel/pull/210 for discussion
96+
if hasattr(gzip_file, 'max_read_chunk'):
9797
gzip_file.max_read_chunk = GZIP_MAX_READ_CHUNK
9898

9999
return gzip_file

0 commit comments

Comments
 (0)