summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd2.py b/cmd2.py
index 29a993f3..f6680221 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -3663,7 +3663,6 @@ a..b, a:b, a:, ..b items by indices (inclusive)
"""Generate a transcript file from a given history of commands."""
# Save the current echo state, and turn it off. We inject commands into the
# output using a different mechanism
- import io
saved_echo = self.echo
self.echo = False
@@ -3695,7 +3694,7 @@ a..b, a:b, a:, ..b items by indices (inclusive)
transcript += command
# create a new string buffer and set it to stdout to catch the output
# of the command
- membuf = io.StringIO()
+ membuf = StringIO()
self.stdout = membuf
# then run the command and let the output go into our buffer
self.onecmd_plus_hooks(history_item)