From f550175c7f416ac2bcf0df66ac9c1aaca2f0b5e7 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Mon, 1 Sep 2014 17:07:56 +0100 Subject: [PATCH] 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 --- waflib/ansiterm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/waflib/ansiterm.py b/waflib/ansiterm.py index f56967e3..d8ac3588 100644 --- a/waflib/ansiterm.py +++ b/waflib/ansiterm.py @@ -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 = []