jenkins-bot has submitted this change and it was merged.
Change subject: (bug 66445) New "prop" parameter with action=expandtemplates ......................................................................
(bug 66445) New "prop" parameter with action=expandtemplates
In 1.24wmf8, expandtemplates without prop parameter causes API warning.
Change-Id: I2c164208aa10dc893693c520d38f0386be202d5e --- M pywikibot/site.py 1 file changed, 7 insertions(+), 2 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index 971edc5..abdb9a0 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -4,7 +4,7 @@ on the same topic in different languages). """ # -# (C) Pywikibot team, 2008-2012 +# (C) Pywikibot team, 2008-2014 # # Distributed under the terms of the MIT license. # @@ -1033,7 +1033,12 @@ req['title'] = title if includecomments is True: req['includecomments'] = u'' - return req.submit()['expandtemplates']['*'] + if LV(self.version()) > LV("1.24wmf7"): + key = 'wikitext' + req['prop'] = key + else: + key = '*' + return req.submit()['expandtemplates'][key]
def getcurrenttimestamp(self): """Return server time, {{CURRENTTIMESTAMP}}, as a string.
pywikibot-commits@lists.wikimedia.org