aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2012-02-24 14:25:21 -0500
committerW. Trevor King <wking@drexel.edu>2012-02-24 14:25:21 -0500
commitb2b120d0adbb9522509e366c37b7f8c983858f54 (patch)
tree7d9a9487cf1f120b7a2904ec15c99774eafbf83d /libbe
parent9a56363ccfff67a4d571042c18aae6a0e1b81bfc (diff)
downloadbugseverywhere-b2b120d0adbb9522509e366c37b7f8c983858f54.tar.gz
Avoid generating another StringIO instance in StringInputOutput.get_stdout().
Diffstat (limited to 'libbe')
-rw-r--r--libbe/command/base.py3
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):