Revision: 4298 Author: cosoleto Date: 2007-09-15 19:18:52 +0000 (Sat, 15 Sep 2007)
Log Message: ----------- bugfix (page.get() ; getall() ; page.userName() now work)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-09-15 15:43:20 UTC (rev 4297) +++ trunk/pywikipedia/wikipedia.py 2007-09-15 19:18:52 UTC (rev 4298) @@ -702,12 +702,12 @@ """ if not self._permalink: # When we get the page with getall, the permalink is received automatically - getall(self.site(),[self,],force=True) + getall(self.site(),[self],force=True) return int(self._permalink)
def exists(self): """ - True iff the page exists, even if it's a redirect. + True if the page exists, even if it's a redirect.
If the title includes a section, False if this section isn't found. """ @@ -2202,6 +2202,8 @@ self.site = site self.pages = [] self.throttle = throttle + self.force = force + for pl in pages: if (not hasattr(pl,'_contents') and not hasattr(pl,'_getexception')) or force: self.pages.append(pl) @@ -2272,7 +2274,7 @@ page = Page(self.site, title) for page2 in self.pages: if page2.sectionFreeTitle() == page.sectionFreeTitle(): - if hasattr(page2,'_contents') or hasattr(page2,'_getexception'): + if (hasattr(page2,'_contents') or hasattr(page2,'_getexception')) and not self.force: return break else:
pywikipedia-l@lists.wikimedia.org