http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10892
Revision: 10892 Author: drtrigon Date: 2013-01-12 11:53:40 +0000 (Sat, 12 Jan 2013) Log Message: ----------- patch; in order to be able to use wikidata-test-repo successfully
Modified Paths: -------------- trunk/pywikipedia/subster.py
Modified: trunk/pywikipedia/subster.py =================================================================== --- trunk/pywikipedia/subster.py 2013-01-12 11:43:11 UTC (rev 10891) +++ trunk/pywikipedia/subster.py 2013-01-12 11:53:40 UTC (rev 10892) @@ -175,9 +175,11 @@ self._ConfCSSpostprocPage = pywikibot.Page(self.site, bot_config['ConfCSSpostproc']) self._ConfCSSconfigPage = pywikibot.Page(self.site, bot_config['ConfCSSconfig']) self.pagegen = pagegenerators.ReferringPageGenerator(self._userListPage, onlyTemplateInclusion=True) - self._code = self._ConfCSSpostprocPage.get() - pywikibot.output(u'Imported postproc %s rev %s from %s' % \ - ((self._ConfCSSpostprocPage.title(asLink=True),) + self._ConfCSSpostprocPage.getVersionHistory(revCount=1)[0][:2]) ) + if not ((self.site.family.name == 'wikidata') and (self.site.lang == 'repo')): + # DRTRIGON-130; skip this for test-repo + self._code = self._ConfCSSpostprocPage.get() + pywikibot.output(u'Imported postproc %s rev %s from %s' % \ + ((self._ConfCSSpostprocPage.title(asLink=True),) + self._ConfCSSpostprocPage.getVersionHistory(revCount=1)[0][:2]) ) self._flagenable = {} if self._ConfCSSconfigPage.exists(): exec(self._ConfCSSconfigPage.get()) # with variable: bot_config_wiki
pywikipedia-svn@lists.wikimedia.org