Skip to content

Commit 1c7a99c

Browse files
committed
Correctly report that any open stream handler is readable.
This addresses #73
1 parent 05f9893 commit 1c7a99c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/aws_encryption_sdk/streaming_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,15 @@ def __exit__(self, exc_type, exc_value, traceback):
193193
_LOGGER.exception("Error on closing")
194194
return False
195195

196+
def readable(self):
197+
# () -> bool
198+
"""Return `True` if the stream can be read from.
199+
200+
:rtype: bool
201+
"""
202+
# Open streams are currently always readable.
203+
return not self.closed
204+
196205
def read(self, b=None):
197206
"""Returns either the requested number of bytes or the entire stream.
198207

0 commit comments

Comments
 (0)