summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-09-08 16:01:04 -0400
committerEric Lin <anselor@gmail.com>2021-04-04 17:28:51 -0400
commit5a7cd741295d712e3ad13008915512946a0febf1 (patch)
tree30bc7e7a11eba784f6114b0749c77d73c2a2bdf3
parent5b9e99979e9b5c4b04d674bad3a4d156cec62c31 (diff)
downloadcmd2-git-util_fixes.tar.gz
Shared implementation of write it StdSimutil_fixes
-rw-r--r--cmd2/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index 292f88dc..3a3e7da9 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -477,11 +477,7 @@ class StdSim:
"""
if not isinstance(s, str):
raise TypeError('write() argument must be str, not {}'.format(type(s)))
-
- if not self.pause_storage:
- self.buffer.byte_buf += s.encode(encoding=self.encoding, errors=self.errors)
- if self.echo:
- self.inner_stream.write(s)
+ self.buffer.write(s.encode(self.encoding, errors=self.errors))
def getvalue(self) -> str:
"""Get the internal contents as a str"""