http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10947
Revision: 10947 Author: xqt Date: 2013-01-17 07:18:39 +0000 (Thu, 17 Jan 2013) Log Message: ----------- enable wikidata site.is_data_repository() method
Modified Paths: -------------- trunk/pywikipedia/families/wikidata_family.py
Modified: trunk/pywikipedia/families/wikidata_family.py =================================================================== --- trunk/pywikipedia/families/wikidata_family.py 2013-01-17 07:16:59 UTC (rev 10946) +++ trunk/pywikipedia/families/wikidata_family.py 2013-01-17 07:18:39 UTC (rev 10947) @@ -59,3 +59,11 @@ if family.config.SSL_connection: def protocol(self, code): return 'https' + + 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