diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-04-11 18:12:00 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-04-11 18:12:00 -0400 |
commit | 1f08873a0bc46e90c5eb1bff63061688acc3c4fb (patch) | |
tree | 27f10c95e8a672d86274e6e963c904661186ed1f /cmd2/utils.py | |
parent | 7f5339ecb68c2f788e51f7e98589d35f1e53069e (diff) | |
download | cmd2-git-1f08873a0bc46e90c5eb1bff63061688acc3c4fb.tar.gz |
Clearing bytearray instead of creating a new object
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r-- | cmd2/utils.py | 2 |
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.""" |