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")
'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()