]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/mediawiki.py
Fix web verification in MediaWiki and improve handling.
[wizard.git] / wizard / app / mediawiki.py
index a1a1eec56908f32700aa3bee89c824b8ef9152d6..d07b1e7f13576fbb474a9c585f13f5d10526c0d9 100644 (file)
@@ -54,9 +54,11 @@ class Application(deploy.Application):
         match = regex.search(contents)
         if not match: return None
         return distutils.version.LooseVersion(match.group(2)[1:-1])
-    def checkWeb(self, d):
-        page = d.fetch("index.php")
-        return page.find("<!-- Served by") != -1
+    def checkWeb(self, d, out=None):
+        page = d.fetch("/index.php?title=Main_Page")
+        if type(out) is list:
+            out.append(page)
+        return page.find("<!-- Served") != -1
     def install(self, version, options):
         try:
             os.unlink("LocalSettings.php")
@@ -79,7 +81,7 @@ class Application(deploy.Application):
             'SysopPass': options.admin_password,
             'SysopPass2': options.admin_password,
             }
-        result = install.fetch(options, 'config/index.php', post=postdata)
+        result = install.fetch(options, '/config/index.php', post=postdata)
         if options.verbose: print result
         if result.find("Installation successful") == -1:
             raise install.Failure()