aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/log.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-01-08 13:36:21 +0100
committerGuido Günther <agx@sigxcpu.org>2011-01-08 15:23:16 +0100
commit79ed2e0f088d0b374f5dbed12051770236268238 (patch)
tree96b8cb9e94425115759aaa97f324c2ac0c5c4a2b /gbp/log.py
parentfc1d47d222e76e1c89b8c022f7f285bddbc17f96 (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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/log.py b/gbp/log.py
index 07de1cf0..86e4943c 100644
--- a/gbp/log.py
+++ b/gbp/log.py
@@ -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