Revision: 5151 Author: btongminh Date: 2008-03-22 09:46:36 +0000 (Sat, 22 Mar 2008)
Log Message: ----------- Fix a regression introduced in r5037: Fetching an edit token when we already had an edit token did not work, even when the edit token has changed.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-03-21 21:06:51 UTC (rev 5150) +++ trunk/pywikipedia/wikipedia.py 2008-03-22 09:46:36 UTC (rev 5151) @@ -4342,7 +4342,7 @@ except KeyError: return False
- def _load(self, sysop = False): + def _load(self, sysop = False, force = False): """ Loads user data. This is only done if we didn't do get any page yet and the information @@ -4352,7 +4352,7 @@ * sysop - Get sysop user data? """ index = self._userIndex(sysop) - if self._userData[index]: + if self._userData[index] and not force: return
if verbose: @@ -5374,7 +5374,7 @@ index = self._userIndex(sysop) if getagain or (getalways and self._token[index] is None): output(u'Getting a token.') - self._load(sysop = sysop) + self._load(sysop = sysop, force = True) if self._token[index] is not None: return self._token[index] else: