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.
2 parents f5c904c + 1f08873 commit 4177e0fCopy full SHA for 4177e0f
cmd2/utils.py
@@ -325,7 +325,7 @@ def getvalue(self) -> str:
325
326
def getbytes(self) -> bytes:
327
"""Get the internal contents as bytes"""
328
- return self.buffer.byte_buf
+ return bytes(self.buffer.byte_buf)
329
330
def read(self) -> str:
331
"""Read from the internal contents as a str and then clear them out"""
@@ -341,7 +341,7 @@ def readbytes(self) -> bytes:
341
342
def clear(self) -> None:
343
"""Clear the internal contents"""
344
- self.buffer.byte_buf = bytearray()
+ self.buffer.byte_buf.clear()
345
346
def isatty(self) -> bool:
347
"""StdSim only considered an interactive stream if `echo` is True and `inner_stream` is a tty."""
0 commit comments