[Pywikipedia-svn] SVN: [7251] trunk/pywikipedia/blockpageschecker.py

nicdumz at svn.wikimedia.org nicdumz at svn.wikimedia.org
Tue Sep 15 20:58:09 UTC 2009


Revision: 7251
Author:   nicdumz
Date:     2009-09-15 20:58:08 +0000 (Tue, 15 Sep 2009)

Log Message:
-----------
site has to be defined before argument handling

Modified Paths:
--------------
    trunk/pywikipedia/blockpageschecker.py

Modified: trunk/pywikipedia/blockpageschecker.py
===================================================================
--- trunk/pywikipedia/blockpageschecker.py	2009-09-15 19:37:15 UTC (rev 7250)
+++ trunk/pywikipedia/blockpageschecker.py	2009-09-15 20:58:08 UTC (rev 7251)
@@ -214,6 +214,8 @@
     moveBlockCheck = False; genFactory = pagegenerators.GeneratorFactory()
     # To prevent Infinite loops
     errorCount = 0
+    # Load the right site
+    site = wikipedia.getSite()
     # Loading the default options.
     for arg in wikipedia.handleArgs():
         if arg == '-always':
@@ -241,8 +243,6 @@
         else:
             genFactory.handleArg(arg)
 
-    # Load the right site
-    site = wikipedia.getSite()
     # Take the right templates to use, the category and the comment
     TSP = wikipedia.translate(site, templateSemiProtection)
     TTP = wikipedia.translate(site, templateTotalProtection)





More information about the Pywikipedia-svn mailing list