http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10690
Revision: 10690 Author: xqt Date: 2012-11-11 08:20:55 +0000 (Sun, 11 Nov 2012) Log Message: ----------- update getPatrolToken, patch submitted by YFdyh000, thanks
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-11-11 04:54:57 UTC (rev 10689) +++ trunk/pywikipedia/wikipedia.py 2012-11-11 08:20:55 UTC (rev 10690) @@ -7883,6 +7883,7 @@ params = { 'action' : 'query', 'list' : 'recentchanges', + 'rctype' : 'new', 'rcshow' : '!patrolled', 'rctoken' : 'patrol', 'rclimit' : 1, @@ -7890,6 +7891,8 @@ data = query.GetData(params, self, encodeTitle = False) if 'error' in data: raise RuntimeError('%s' % data['error']) + elif 'warnings' in data: + raise RuntimeError('%s' % data['warnings']) try: rcData = data['query']['recentchanges'] except KeyError: