diff --git a/qds_sdk/commands.py b/qds_sdk/commands.py index f241d63d..351737b0 100644 --- a/qds_sdk/commands.py +++ b/qds_sdk/commands.py @@ -1261,8 +1261,7 @@ def _read_iteratively(key_instance, fp, delim): elif isinstance(fp, io.BufferedIOBase) or isinstance(fp, io.RawIOBase): fp.write(data.decode('utf8').replace(chr(1), delim).encode('utf8')) else: - # Can this happen? Don't know what's the right thing to do in this case. - pass + raise ValueError('Only subclasses of io.TextIOBase or io.BufferedIOBase supported') except StopIteration: # Stream closes itself when the exception is raised return