RedirectOutput: Add missing self into flush and implement isatty function
authorAthanasios Oikonomou <athoik@gmail.com>
Tue, 21 Apr 2015 21:07:04 +0000 (00:07 +0300)
committerlittlesat <littlesat99@yahoo.com>
Wed, 22 Apr 2015 05:55:06 +0000 (07:55 +0200)
commit993e37993b9f4359fdb7498bf1e61821d9e64c6b
tree3adc09b975d22b54b63c363219f44b98fb30e32a
parenta2d4397ab76de0f96d0a017165e0fb03854e870a
RedirectOutput: Add missing self into flush and implement isatty function

Without self any call to flush will miserably fail with the following error:
TypeError: flush() takes no arguments (1 given)

Also any call to isatty fails too with the following error:
AttributeError: EnigmaOutput instance has no attribute 'isatty'

Hardcode it to True since stderr and stdout have isatty by default True.

>>> import sys
>>> sys.stderr.isatty()
True
>>> sys.stdout.isatty()
True

Signed-off-by: littlesat <littlesat99@yahoo.com>
lib/python/Tools/RedirectOutput.py