diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-01-08 13:36:21 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-01-08 15:23:16 +0100 |
commit | 79ed2e0f088d0b374f5dbed12051770236268238 (patch) | |
tree | 96b8cb9e94425115759aaa97f324c2ac0c5c4a2b /gbp/log.py | |
parent | fc1d47d222e76e1c89b8c022f7f285bddbc17f96 (diff) |
Use tristate option for --color=value
this allows true and false as alias for on and off.
Diffstat (limited to 'gbp/log.py')
-rw-r--r-- | gbp/log.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -18,6 +18,7 @@ """Simple colored logging classes""" import sys +import gbp.tristate logger = None @@ -53,9 +54,9 @@ class Logger(object): if type(color) == type(True): self.color = color else: - if color.lower() == "on": + if color.is_on(): self.color = True - elif color.lower() == "auto": + elif color.is_auto(): if (sys.stderr.isatty() and sys.stdout.isatty()): self.color = True |