From 7f5339ecb68c2f788e51f7e98589d35f1e53069e Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Thu, 11 Apr 2019 18:01:02 -0400 Subject: Fixed issue where pointer to bytearray was being returned instead of copied bytes --- cmd2/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd2/utils.py') diff --git a/cmd2/utils.py b/cmd2/utils.py index d8ac513d..e4ea79ef 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""" -- cgit v1.2.1