Add the 'errors' attribute to AnsiTerm

When using input in Python3 an exception is thrown because the AnsiTerm does not
have the errors attribute. This patch fixes that.

Signed-off-by: Thomas Nagy <tnagy2pow10@gmail.com>
This commit is contained in:
Matt Clarkson 2014-09-01 17:07:56 +01:00 committed by Thomas Nagy
parent 4b03c35660
commit f550175c7f
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ except ImportError:
class AnsiTerm(object):
def __init__(self, stream):
self.stream = stream
self.errors = self.stream.errors
self.encoding = self.stream.encoding
def write(self, txt):
@ -86,6 +87,7 @@ else:
"""
def __init__(self, s):
self.stream = s
self.errors = s.errors
self.encoding = s.encoding
self.cursor_history = []