diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-04-11 18:21:27 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-04-11 18:21:27 -0400 |
commit | 6a24a64d02fedc5c4920499c8d2fd3d91281204c (patch) | |
tree | cf475ef13ebc74d4346c83b19a535bf21bf15ea7 | |
parent | d9277d091f596ad85096c3500c7f6510b10ddcc9 (diff) | |
parent | 4177e0fcd2daada9893c08161e55f9a7a0adaac5 (diff) | |
download | cmd2-git-6a24a64d02fedc5c4920499c8d2fd3d91281204c.tar.gz |
Merge branch 'master' into pyscript_capture
-rw-r--r-- | cmd2/utils.py | 4 |
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.""" |