John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/252400

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/00/252400/1

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: newchange
Gerrit-Change-Id: I85bf51d75390c06c36fd532f2f56e656846a538c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to