http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9288
Revision: 9288 Author: huji Date: 2011-06-05 20:12:25 +0000 (Sun, 05 Jun 2011) Log Message: ----------- (bug 3311663) Error in duplicate removal code: Wikis using customized permissions cause dict objects to be parsed out of the text by Query.GetData when permissions are parsed out
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2011-06-04 10:13:18 UTC (rev 9287) +++ trunk/pywikipedia/wikipedia.py 2011-06-05 20:12:25 UTC (rev 9288) @@ -5576,7 +5576,13 @@
# Get user groups and rights if 'groups' in text: - self._rights[index] = text['groups'] + self._rights[index] = [] + for group in text['groups']: + # Convert dictionaries to list items (bug 3311663) + if isinstance(group, dict): + self._rights[index].extend(group.keys()) + else: + self._rights[index].append(group) self._rights[index].extend(text['rights']) # Warnings # Don't show warnings for not logged in users, they will just fail to