summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-11 18:21:27 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-11 18:21:27 -0400
commit6a24a64d02fedc5c4920499c8d2fd3d91281204c (patch)
treecf475ef13ebc74d4346c83b19a535bf21bf15ea7
parentd9277d091f596ad85096c3500c7f6510b10ddcc9 (diff)
parent4177e0fcd2daada9893c08161e55f9a7a0adaac5 (diff)
downloadcmd2-git-6a24a64d02fedc5c4920499c8d2fd3d91281204c.tar.gz
Merge branch 'master' into pyscript_capture
-rw-r--r--cmd2/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index d8ac513d..35c953e0 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -325,7 +325,7 @@ class StdSim(object):
def getbytes(self) -> bytes:
"""Get the internal contents as bytes"""
- return self.buffer.byte_buf
+ return bytes(self.buffer.byte_buf)
def read(self) -> str:
"""Read from the internal contents as a str and then clear them out"""
@@ -341,7 +341,7 @@ class StdSim(object):
def clear(self) -> None:
"""Clear the internal contents"""
- self.buffer.byte_buf = bytearray()
+ self.buffer.byte_buf.clear()
def isatty(self) -> bool:
"""StdSim only considered an interactive stream if `echo` is True and `inner_stream` is a tty."""