|
|
@ -130,7 +130,7 @@ def writefile(
|
|
|
|
with tmpfile(path) as base_stream:
|
|
|
|
with tmpfile(path) as base_stream:
|
|
|
|
streams: Tuple[Any, ...] = (base_stream,)
|
|
|
|
streams: Tuple[Any, ...] = (base_stream,)
|
|
|
|
if path.suffix == '.gz':
|
|
|
|
if path.suffix == '.gz':
|
|
|
|
gz_stream = cast(IO[bytes], gzip.GzipFile(filename='', mtime=0, fileobj=base_stream))
|
|
|
|
gz_stream = cast(IO[bytes], gzip.GzipFile(filename='', mtime=0, fileobj=base_stream, mode='wb'))
|
|
|
|
streams = (gz_stream,) + streams
|
|
|
|
streams = (gz_stream,) + streams
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
gz_stream = base_stream
|
|
|
|
gz_stream = base_stream
|
|
|
|