new command-line option --color - Issue 1474

This commit is contained in:
Thomas Nagy 2014-08-17 22:59:18 +02:00
parent ad330d76bc
commit 002badce44
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 2 additions and 1 deletions

View File

@ -179,7 +179,8 @@ class formatter(logging.Formatter):
except Exception:
msg = rec.msg
if rec.stream.isatty():
use = colors_lst['USE']
if (use == 1 and rec.stream.isatty()) or use == 2:
c1 = getattr(rec, 'c1', None)
if c1 is None: