Revision: 7683 Author: xqt Date: 2009-11-23 13:39:16 +0000 (Mon, 23 Nov 2009)
Log Message: ----------- bugfix for KeyError. You could only load 500 users at once. query-continue has to be implemented.
Modified Paths: -------------- trunk/pywikipedia/userlib.py
Modified: trunk/pywikipedia/userlib.py =================================================================== --- trunk/pywikipedia/userlib.py 2009-11-23 11:35:55 UTC (rev 7682) +++ trunk/pywikipedia/userlib.py 2009-11-23 13:39:16 UTC (rev 7683) @@ -570,9 +570,11 @@ raise else: break - - for uj in self.users: - x = data[uj.name()] + for uj in self.users: + try: + x = data[uj.name()] + except KeyError: + break uj._editcount = x['editcount'] if 'groups' in x: uj._groups = x['groups']
pywikipedia-svn@lists.wikimedia.org