X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/1f5efa4276a5b6f83e9d5e0b22bb3efaa78c3e14..3f18b7fff1c5d5cd3d91897a85a425704ba4295e:/wizard/app/__init__.py?ds=inline diff --git a/wizard/app/__init__.py b/wizard/app/__init__.py index 483f7ee..ee9f58d 100644 --- a/wizard/app/__init__.py +++ b/wizard/app/__init__.py @@ -264,8 +264,12 @@ class Application(object): Checks if a given page of an autoinstall contains a particular string. """ page = deployment.fetch(page) - logging.info("checkWebPage:\n\n" + page) - return page.find(output) != -1 + result = page.find(output) != -1 + if result: + logging.debug("checkWebPage (passed):\n\n" + page) + else: + logging.info("checkWebPage (failed):\n\n" + page) + return result def checkConfig(self, deployment): """ Checks whether or not an autoinstall has been configured/installed @@ -591,7 +595,8 @@ class Failure(Error): class InstallFailure(Error): """Installation failed for unknown reason.""" - pass + def __str__(self): + return """Installation failed for unknown reason.""" class RecoverableInstallFailure(InstallFailure): """ @@ -621,16 +626,11 @@ ERROR: Upgrade script failed, details: class UpgradeVerificationFailure(Failure): """Upgrade script passed, but website wasn't accessible afterwards""" - #: String details of failure (possibly stdout or stderr output) - details = None - def __init__(self, details): - self.details = details def __str__(self): return """ -ERROR: Upgrade script passed, but website wasn't accessible afterwards. Details: - -%s""" % self.details +ERROR: Upgrade script passed, but website wasn't accessible afterwards. Check +the debug logs for the contents of the page.""" class BackupFailure(Failure): """Backup script failed."""