don't want to use context manager here
This commit is contained in:
parent
445c5690e1
commit
97688ffae1
@ -599,10 +599,10 @@ def load_libraryfile(
|
|||||||
if is_gzipped(path):
|
if is_gzipped(path):
|
||||||
if use_mmap:
|
if use_mmap:
|
||||||
logger.info('Asked to mmap a gzipped file, reading into memory instead...')
|
logger.info('Asked to mmap a gzipped file, reading into memory instead...')
|
||||||
gz_stream = gzip.open(path, mode='rb')
|
gz_stream = gzip.open(path, mode='rb') # noqa: SIM115
|
||||||
stream = io.BytesIO(gz_stream.read()) # type: ignore
|
stream = io.BytesIO(gz_stream.read()) # type: ignore
|
||||||
else:
|
else:
|
||||||
gz_stream = gzip.open(path, mode='rb')
|
gz_stream = gzip.open(path, mode='rb') # noqa: SIM115
|
||||||
stream = io.BufferedReader(gz_stream) # type: ignore
|
stream = io.BufferedReader(gz_stream) # type: ignore
|
||||||
else: # noqa: PLR5501
|
else: # noqa: PLR5501
|
||||||
if use_mmap:
|
if use_mmap:
|
||||||
|
Loading…
Reference in New Issue
Block a user