Revision: 7690
Author: xqt
Date: 2009-11-24 17:04:42 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
Don't putSpacesInLists within <timeline /> (Do not break line comments)
Modified Paths:
--------------
trunk/pywikipedia/cosmetic_changes.py
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2009-11-24 11:05:07 UTC (rev 7689)
+++ trunk/pywikipedia/cosmetic_changes.py 2009-11-24 17:04:42 UTC (rev 7690)
@@ -443,8 +443,9 @@
and French Wikipedia. It might be that it is not wanted on other wikis.
If there are any complaints, please file a bug report.
"""
+ exceptions = ['comment', 'math', 'nowiki', 'pre', 'source', 'timeline']
if not self.redirect:
- text = pywikibot.replaceExcept(text, r'(?m)^(?P<bullet>[:;]*(\*+|#+)[:;\*#]*)(?P<char>[^\s\*#:;].+?)', '\g<bullet> \g<char>', ['comment', 'math', 'nowiki', 'pre', 'source'])
+ text = pywikibot.replaceExcept(text, r'(?m)^(?P<bullet>[:;]*(\*+|#+)[:;\*#]*)(?P<char>[^\s\*#:;].+?)', '\g<bullet> \g<char>', exceptions)
return text
#from fixes.py
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']