summaryrefslogtreecommitdiff
path: root/gbp/log.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-11-25 17:49:03 +0100
committerGuido Günther <agx@sigxcpu.org>2012-11-25 19:08:19 +0100
commit00ed38f62ed9d4509ae8579388d52f5e34147429 (patch)
tree547fb1e70559894ad73a499ca21b8ab11c5dbd4c /gbp/log.py
parentebbe63562c9436cefd72d776b898d91960286b04 (diff)
downloadgit-buildpackage-00ed38f62ed9d4509ae8579388d52f5e34147429.tar.gz
git-buildpackage-00ed38f62ed9d4509ae8579388d52f5e34147429.tar.bz2
git-buildpackage-00ed38f62ed9d4509ae8579388d52f5e34147429.zip
gbp.log: Improve error message on broken color lists
Diffstat (limited to 'gbp/log.py')
-rw-r--r--gbp/log.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gbp/log.py b/gbp/log.py
index b9950565..88bd913a 100644
--- a/gbp/log.py
+++ b/gbp/log.py
@@ -144,6 +144,11 @@ def _parse_color_scheme(color_scheme=""):
scheme = {}
colors = color_scheme.split(':')
levels = (DEBUG, INFO, WARNING, ERROR)
+
+ if color_scheme and len(colors) != len(levels):
+ raise ValueError("Number color fields in color scheme not %d'"
+ % len(levels))
+
for field, color in enumerate(colors):
level = levels[field]
try: