]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/wordpress.py
Rewrite .scripts to .wizard.
[wizard.git] / wizard / app / wordpress.py
index 7ece61ea988b2f90a64d1002115cb634d900b630..799908944d32f3e70b632186571e32d81b5f6f58 100644 (file)
@@ -55,7 +55,10 @@ class Application(app.Application):
     def urlFromExtract(self, deployment):
         try:
             meta = sql.connect(deployment.dsn)
-            wp_options = meta.tables["wp_options"]
+            try:
+                wp_options = meta.tables["wp_options"]
+            except KeyError:
+                return None
             query = wp_options.select(wp_options.c.option_name == 'home')
             return query.execute().fetchone()['option_value']
         except sqlalchemy.exc.OperationalError:
@@ -67,7 +70,7 @@ class Application(app.Application):
     def checkWeb(self, deployment):
         return self.checkWebPage(deployment, "",
                 outputs=["<html", "WordPress", "feed"],
-                exclude=["Error establishing a database connection"])
+                exclude=["Error establishing a database connection", "Account unknown"])
     def detectVersion(self, deployment):
         return self.detectVersionFromFile("wp-includes/version.php", php.re_var("wp_version"))
     def install(self, version, options):