mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-25 10:32:59 +00:00
readfile: do transparent gzip by default
....but there's a glad to turn it off if needed
This commit is contained in:
parent
eac6472c97
commit
d0f2e3d730
1 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
import io
|
||||
|
||||
def readfile(filepath):
|
||||
handle = io.open(filepath, "r")
|
||||
from .handle_open import handle_open
|
||||
|
||||
def readfile(filepath, transparent_gzip=True):
|
||||
handle = io.open(filepath, "r") if transparent_gzip else handle_open(filepath, "r")
|
||||
content = handle.read()
|
||||
handle.close()
|
||||
return content
|
Loading…
Reference in a new issue