diff options
author | W. Trevor King <wking@drexel.edu> | 2012-02-24 14:25:21 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2012-02-24 14:25:21 -0500 |
commit | b2b120d0adbb9522509e366c37b7f8c983858f54 (patch) | |
tree | 7d9a9487cf1f120b7a2904ec15c99774eafbf83d /libbe | |
parent | 9a56363ccfff67a4d571042c18aae6a0e1b81bfc (diff) | |
download | bugseverywhere-b2b120d0adbb9522509e366c37b7f8c983858f54.tar.gz |
Avoid generating another StringIO instance in StringInputOutput.get_stdout().
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/command/base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbe/command/base.py b/libbe/command/base.py index 4e1e41f..54de8c2 100644 --- a/libbe/command/base.py +++ b/libbe/command/base.py @@ -483,8 +483,7 @@ class StringInputOutput (InputOutput): def get_stdout(self): ret = self.stdout.getvalue() - self.stdout = StringIO.StringIO() # clear stdout for next read - self.stdin.encoding = 'utf-8' + self.stdout.truncate(size=0) return ret class UnconnectedStorageGetter (object): |