Mercurial > hg-stable
changeset 13998:14c7526fed89
color: code simplification
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 24 Apr 2011 23:06:19 +0200 |
parents | b083d00578bf |
children | 8f9478be9a94 |
files | hgext/color.py |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sun Apr 24 23:06:18 2011 +0200 +++ b/hgext/color.py Sun Apr 24 23:06:19 2011 +0200 @@ -126,11 +126,9 @@ if mode not in ('auto', 'terminfo'): return - _terminfo_params.update(dict(( - (key[6:], (False, int(val))) + _terminfo_params.update((key[6:], (False, int(val))) for key, val in ui.configitems('color') - if key.startswith('color.') - ))) + if key.startswith('color.')) try: curses.setupterm() @@ -324,7 +322,7 @@ _terminfo_params = {} elif mode == 'terminfo': _terminfosetup(ui) - elif mode not in ('ansi', 'terminfo'): + else: return def colorcmd(orig, ui_, opts, cmd, cmdfunc): coloropt = opts['color']