Revision: 7734
Author: alexsh
Date: 2009-12-05 14:57:34 +0000 (Sat, 05 Dec 2009)
Log Message:
-----------
fix: KeyError for move protect only
Modified Paths:
--------------
trunk/pywikipedia/blockpageschecker.py
Modified: trunk/pywikipedia/blockpageschecker.py
===================================================================
--- trunk/pywikipedia/blockpageschecker.py 2009-12-04 15:28:31 UTC (rev
7733)
+++ trunk/pywikipedia/blockpageschecker.py 2009-12-05 14:57:34 UTC (rev
7734)
@@ -292,13 +292,16 @@
pywikibot.output("%s is sysop-protected : this account can't edit
it! Skipping..." % pagename)
continue
"""
- editRestr = restrictions['edit']
- if editRestr and editRestr[0] == 'sysop':
- try:
- config.sysopnames[site.family.name][site.lang]
- except:
- pywikibot.output("%s is sysop-protected : this account can't
edit it! Skipping..." % pagename)
- continue
+ try:
+ editRestr = restrictions['edit']
+ if editRestr and editRestr[0] == 'sysop':
+ try:
+ config.sysopnames[site.family.name][site.lang]
+ except:
+ pywikibot.output("%s is sysop-protected : this account
can't edit it! Skipping..." % pagename)
+ continue
+ except KeyError:
+ continue
# Understand, according to the template in the page, what should be
the protection
# and compare it with what there really is.
_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn