color: clarify name of an argument of 'win32print'
In the current code, the function called to write happens to the 'orig' version
of the method calling 'win32print' (obtained with a 'super' call). However, the
variable could have a better name. That will be useful when we'll stop having
inheritance in play.
--- a/mercurial/color.py Thu Feb 23 19:45:32 2017 +0100
+++ b/mercurial/color.py Fri Feb 24 21:31:47 2017 +0100
@@ -288,7 +288,7 @@
ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)',
re.MULTILINE | re.DOTALL)
- def win32print(text, orig, **opts):
+ def win32print(text, writefunc, **opts):
label = opts.get('label', '')
attr = origattr
@@ -325,7 +325,7 @@
if sattr:
attr = mapcolor(int(sattr), attr)
_kernel32.SetConsoleTextAttribute(stdout, attr)
- orig(m.group(2), **opts)
+ writefunc(m.group(2), **opts)
m = re.match(ansire, m.group(3))
finally:
# Explicitly reset original attributes