http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11090
Revision: 11090 Author: amir Date: 2013-02-20 09:13:59 +0000 (Wed, 20 Feb 2013) Log Message: ----------- a little change in Wikidata's API (wikibase) made a bug for non-existed items
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-02-20 08:43:44 UTC (rev 11089) +++ trunk/pywikipedia/wikipedia.py 2013-02-20 09:13:59 UTC (rev 11090) @@ -4289,7 +4289,7 @@ data['query'] = {'pages': data['entities']} for pageid in data['entities'].keys(): if pageid == "-1": - continue #Means the page does not exist + raise RuntimeError("API query error, no pages found: %s" % data) params1['titles'] = pageid ndata=query.GetData(params1, self.site(), sysop=sysop) data['entities'].update(ndata['query']['pages'])
pywikipedia-svn@lists.wikimedia.org