http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10946
Revision: 10946 Author: xqt Date: 2013-01-17 07:16:59 +0000 (Thu, 17 Jan 2013) Log Message: ----------- enable 'real' wikidata
Modified Paths: -------------- branches/rewrite/pywikibot/families/wikidata_family.py
Modified: branches/rewrite/pywikibot/families/wikidata_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikidata_family.py 2013-01-17 06:59:20 UTC (rev 10945) +++ branches/rewrite/pywikibot/families/wikidata_family.py 2013-01-17 07:16:59 UTC (rev 10946) @@ -16,7 +16,10 @@ 'client': 'wikidata-test-client.wikimedia.de', }
- def shared_data_repository(self, code): - # for here an now we just use the test repo - # for wikimedia families the method can return wikidata itself - return ('repo', 'wikidata') if code == 'client' else (None, None) + def shared_data_repository(self, code, transcluded=False): + """Always return a repository tupe. This enables testing whether + the site opject is the repository itself, see Site.is_data_repository() + + """ + return ('wikidata', + 'wikidata') if code == 'wikidata' else ('repo', 'wikidata')
pywikipedia-svn@lists.wikimedia.org