[Pywikipedia-svn] SVN: [7326] trunk/pywikipedia/userlib.py
alexsh at svn.wikimedia.org
alexsh at svn.wikimedia.org
Tue Sep 29 03:59:54 UTC 2009
Revision: 7326
Author: alexsh
Date: 2009-09-29 03:59:54 +0000 (Tue, 29 Sep 2009)
Log Message:
-----------
fix data not had 'groups'
Modified Paths:
--------------
trunk/pywikipedia/userlib.py
Modified: trunk/pywikipedia/userlib.py
===================================================================
--- trunk/pywikipedia/userlib.py 2009-09-28 12:41:06 UTC (rev 7325)
+++ trunk/pywikipedia/userlib.py 2009-09-29 03:59:54 UTC (rev 7326)
@@ -60,7 +60,7 @@
return self._name
def __str__(self):
- return '%s:%s' % (self.site() , self.name() )
+ return u'%s:%s' % (self.site() , self.name() )
def __repr__(self):
return self.__str__()
@@ -400,7 +400,8 @@
for oj in user:
data = totals[oj.name().lower()]
oj._editcount = data['editcount']
- oj._groups = data['groups']
+ if data.has_key('groups'):
+ oj._groups = data['groups']
oj._blocked = data.has_key('blockedby')
if __name__ == '__main__':
More information about the Pywikipedia-svn
mailing list