Revision: 8001 Author: xqt Date: 2010-03-13 13:26:43 +0000 (Sat, 13 Mar 2010)
Log Message: ----------- is there any reason not to use api to _GetAll() ?
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-03-13 12:27:53 UTC (rev 8000) +++ trunk/pywikipedia/wikipedia.py 2010-03-13 13:26:43 UTC (rev 8001) @@ -3664,11 +3664,8 @@
def run(self): if self.pages: - doAPI = None - # API Implemented Check - # doAPI = self.site.has_api()
- if doAPI: + if self.site.has_api(): while True: try: data = self.getDataApi() @@ -3691,7 +3688,6 @@ self._norm = dict([(x['from'],x['to']) for x in data['query']['normalized']]) for vals in data['query']['pages'].values(): self.oneDoneApi(vals) - else: while True: try: @@ -3737,6 +3733,7 @@ except PageNotFound: return # All of the ones that have not been found apparently do not exist + for pl in self.pages: if not hasattr(pl,'_contents') and not hasattr(pl,'_getexception'): pl._getexception = NoPage
pywikipedia-svn@lists.wikimedia.org