We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e9aab commit 094a9c0Copy full SHA for 094a9c0
src/zlib_ng/gzip_ng_threaded.py
@@ -204,6 +204,9 @@ def __init__(self,
204
queue_size: int = 1,
205
block_size: int = 1024 * 1024,
206
):
207
+ # File should be closed during init, so __exit__ method does not
208
+ # touch the self.raw value before it is initialized.
209
+ self._closed = True
210
if "t" in mode or "r" in mode:
211
raise ValueError("Only binary writing is supported")
212
if "b" not in mode:
@@ -243,8 +246,8 @@ def __init__(self,
243
246
self._crc = 0
244
247
self.running = False
245
248
self._size = 0
- self._closed = False
249
self.raw = open_as_binary_stream(filename, mode)
250
+ self._closed = False
251
self._write_gzip_header()
252
self.start()
253
0 commit comments