checkkconfigsymbols.py: add --no-color option, don't print color to non-TTY

Only print the ANSI colour escape codes if stdout is a TTY. Useful if
redirecting output to a file or piping to another script.

Also add a new option, --no-color, if the user wants to disable colour
output for whatever reason.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed