Revision: 6322 Author: nicdumz Date: 2009-02-04 16:13:16 +0000 (Wed, 04 Feb 2009)
Log Message: ----------- BugFix: use a wikipedia.Page object as self.stopPage instead of the page title
Modified Paths: -------------- trunk/pywikipedia/reflinks.py
Modified: trunk/pywikipedia/reflinks.py =================================================================== --- trunk/pywikipedia/reflinks.py 2009-02-04 15:46:06 UTC (rev 6321) +++ trunk/pywikipedia/reflinks.py 2009-02-04 16:13:16 UTC (rev 6322) @@ -343,7 +343,7 @@ self.limit = limit self.ignorepdf = ignorepdf self.site = wikipedia.getSite() - self.stopPage = wikipedia.translate(self.site, stopPage) + self.stopPage = wikipedia.Page(self.site, wikipedia.translate(self.site, stopPage))
local = wikipedia.translate(self.site, badtitles) if local: @@ -356,8 +356,7 @@ self.deduplicator = DuplicateReferences()
try : - self.stopPageRevId = wikipedia.Page(self.site, - self.stopPage).latestRevision() + self.stopPageRevId = self.stopPage.latestRevision() except wikipedia.NoPage : wikipedia.output(u'The stop page %s does not exist' % self.stopPage.aslink()) @@ -665,8 +664,7 @@
if editedpages % 20 == 0: wikipedia.output('\03{lightgreen}Checking stop page...\03{default}') - actualRev = wikipedia.Page(self.site, - self.stopPage).latestRevision() + actualRev = self.stopPage.latestRevision() if actualRev != self.stopPageRevId: wikipedia.output(u'[[%s]] has been edited : Someone wants us to stop.' % self.stopPage) return
pywikipedia-l@lists.wikimedia.org