changeset 19297:8ddc3cd962ba

color: only provide the required opt to _modesetup
author Simon Heimberg <simohe@besonet.ch>
date Wed, 05 Jun 2013 22:06:02 +0200
parents 3c3f6b83f8cb
children 6cd8403e070f
files hgext/color.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/color.py	Thu Jun 06 14:40:26 2013 -0500
+++ b/hgext/color.py	Wed Jun 05 22:06:02 2013 +0200
@@ -159,10 +159,9 @@
               "ECMA-48 color\n"))
         _terminfo_params = {}
 
-def _modesetup(ui, opts):
+def _modesetup(ui, coloropt):
     global _terminfo_params
 
-    coloropt = opts['color']
     auto = coloropt == 'auto'
     always = not auto and util.parsebool(coloropt)
     if not always and not auto:
@@ -405,7 +404,7 @@
         colorui.__bases__ = (ui.__class__,)
         ui.__class__ = colorui
     def colorcmd(orig, ui_, opts, cmd, cmdfunc):
-        mode = _modesetup(ui_, opts)
+        mode = _modesetup(ui_, opts['color'])
         colorui._colormode = mode
         if mode:
             extstyles()