color: code simplification
authorPatrick Mezard <pmezard@gmail.com>
Sun, 24 Apr 2011 23:06:19 +0200
changeset 13998 14c7526fed89
parent 13997 b083d00578bf
child 13999 8f9478be9a94
color: code simplification
hgext/color.py
--- 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']