jenkins-bot has submitted this change and it was merged.
Change subject: Fix tools._ColorFormatter.get_value
......................................................................
Fix tools._ColorFormatter.get_value
My amendments to 9146f17 introduced a crash.
Bug: T118371
Change-Id: I85bf51d75390c06c36fd532f2f56e656846a538c
---
M pywikibot/tools/formatter.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/formatter.py b/pywikibot/tools/formatter.py
index 7697180..ee34057 100644
--- a/pywikibot/tools/formatter.py
+++ b/pywikibot/tools/formatter.py
@@ -76,7 +76,7 @@
def get_value(self, key, args, kwargs):
"""Get value, filling in 'color' when it is a valid
color."""
- if key == 'color' and kwargs['color'] in self.colors:
+ if key == 'color' and kwargs.get('color') in self.colors:
return '\03{{{0}}}'.format(kwargs[key])
else:
return super(_ColorFormatter, self).get_value(key, args, kwargs)
--
To view, visit
https://gerrit.wikimedia.org/r/252400
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85bf51d75390c06c36fd532f2f56e656846a538c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>