summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-11 18:12:00 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-04-11 18:12:00 -0400
commit1f08873a0bc46e90c5eb1bff63061688acc3c4fb (patch)
tree27f10c95e8a672d86274e6e963c904661186ed1f
parent7f5339ecb68c2f788e51f7e98589d35f1e53069e (diff)
downloadcmd2-git-1f08873a0bc46e90c5eb1bff63061688acc3c4fb.tar.gz
Clearing bytearray instead of creating a new object
-rw-r--r--cmd2/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index e4ea79ef..35c953e0 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -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."""