summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 3216ec9..d3513df 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1436,7 +1436,7 @@ class OutputTrap(Borg):
sys.stdout = self.trap
def read(self):
self.trap.seek(0)
- result = self.trap.read()
+ result = self.trap.read().decode() # Py3 sends stdout trap as bytes, not strings
self.trap.truncate(0)
try:
return result.strip('\x00') #TODO: understand this