From aeaf7ef914714e87641fcfa6f494444bc98ad193 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Fri, 9 Jan 2015 01:44:14 +0100 Subject: [PATCH] [FIX] logging: dont use color in windows cmd windows cmd.exe terminal doesnt display them correctly so escape sequences end up uselessly wasting some of the precious 80 char wide screen estate. --- openerp/netsvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/netsvc.py b/openerp/netsvc.py index bfdf7d39352..a215a598e4a 100644 --- a/openerp/netsvc.py +++ b/openerp/netsvc.py @@ -175,7 +175,7 @@ def init_logger(): def is_a_tty(stream): return hasattr(stream, 'fileno') and os.isatty(stream.fileno()) - if isinstance(handler, logging.StreamHandler) and is_a_tty(handler.stream): + if os.name == 'posix' and isinstance(handler, logging.StreamHandler) and is_a_tty(handler.stream): formatter = ColoredFormatter(format) else: formatter = DBFormatter(format)