jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Safer siteinfo warning handling ......................................................................
[FIX] Safer siteinfo warning handling
If a warning is returned with the siteinfo but it's not about the siteinfo it would throw an error.
Change-Id: I0a8ac9ef78fffc40455650ab6c85ee7902a2bce1 --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 7ea6f67..a19afa5 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -985,7 +985,7 @@ raise else: result = {} - if 'warnings' in data: + if 'warnings' in data and 'siteinfo' in data['warnings']: invalid_properties = [] for prop in re.match(u"^Unrecognized values? for parameter " u"'siprop': ([^,]+(?:, [^,]+)*)$",
pywikibot-commits@lists.wikimedia.org