diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-11-25 17:49:03 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-11-25 19:08:19 +0100 |
commit | 00ed38f62ed9d4509ae8579388d52f5e34147429 (patch) | |
tree | 547fb1e70559894ad73a499ca21b8ab11c5dbd4c /gbp/log.py | |
parent | ebbe63562c9436cefd72d776b898d91960286b04 (diff) | |
download | git-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.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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: |