Skip to content

Commit 59e9028

Browse files
committed
remove source_stream.closed from _EncryptionStream.next()
1 parent 1cfe4fb commit 59e9028

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/aws_encryption_sdk/streaming_client.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,13 @@ def next(self):
295295
if self.closed:
296296
_LOGGER.debug("stream is closed")
297297
raise StopIteration()
298-
if self.source_stream.closed and not self.output_buffer:
298+
299+
line = self.readline()
300+
if not line:
299301
_LOGGER.debug("nothing more to read")
300302
raise StopIteration()
301-
return self.readline()
303+
304+
return line
302305

303306
#: Provides hook for Python3 iterator functionality.
304307
__next__ = next

0 commit comments

Comments
 (0)