changeset 377:70ca35d96c49

decode seems a healthy change
author cat@eee
date Mon, 22 Feb 2010 18:09:06 -0500
parents 32b9137577b8
children 0b77ca917fd2
files cmd2.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Sun Feb 21 15:25:22 2010 -0500
+++ b/cmd2.py	Mon Feb 22 18:09:06 2010 -0500
@@ -1436,7 +1436,7 @@
         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