jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/611841 )

Change subject: Fix KeyError when extension has no name
......................................................................

Fix KeyError when extension has no name

Change-Id: I620ed38d5a8ee2cae5b46cb26a5f133699885423
---
M pywikibot/site/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  JJMC89: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index bef6a1f..a96ce98 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -2670,7 +2670,7 @@
         """
         extensions = self.siteinfo['extensions']
         for ext in extensions:
-            if ext['name'] == name:
+            if 'name' in ext and ext['name'] == name:
                 return True
         return False


--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/611841
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I620ed38d5a8ee2cae5b46cb26a5f133699885423
Gerrit-Change-Number: 611841
Gerrit-PatchSet: 1
Gerrit-Owner: John Leen <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Welcome, new contributor! <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to