diff options
| author | Dave Eargle <dave@daveeargle.com> | 2019-06-18 23:10:54 -0600 |
|---|---|---|
| committer | Dave Eargle <dave@daveeargle.com> | 2019-06-18 23:10:54 -0600 |
| commit | 2dd92793d935895de4682ea6e45b774528f9857f (patch) | |
| tree | baaa67fc0375b3a6677bdc9fcc46bf9053cf02e9 | |
| parent | 08259ea5a9b139db0c9c7bc5f5e2821b99843bb4 (diff) | |
| download | cmd2-git-python2.tar.gz | |
rely on already-imported String()python2
closes #694
| -rwxr-xr-x | cmd2.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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) |
