readfile: do transparent gzip by default

....but there's a glad to turn it off if needed
This commit is contained in:
Starbeamrainbowlabs 2022-12-06 19:27:39 +00:00
parent eac6472c97
commit d0f2e3d730
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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