http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10941
Revision: 10941 Author: amir Date: 2013-01-16 19:49:49 +0000 (Wed, 16 Jan 2013) Log Message: ----------- fixing up per r10779#c33253
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-01-16 17:38:19 UTC (rev 10940) +++ trunk/pywikipedia/wikipedia.py 2013-01-16 19:49:49 UTC (rev 10941) @@ -4058,7 +4058,8 @@ site = getSite(site) self._originSite = site Page.__init__(self, site, *args, **kwargs) - + if self.site()!=getSite("wikidata",fam="wikidata"): + raise Error("Site of Wikidata objects must be set as getSite('wikidata',fam='wikidata')") def setitem(self, summary=None, watchArticle=False, minorEdit=True, newPage=False, token=None, newToken=False, sysop=False, captcha=None, botflag=True, maxTries=-1, items={}):
pywikipedia-svn@lists.wikimedia.org