X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/9e26076dce6a76dd0def15a66061c681907c05a9..7b2533e1821daeb667b60c00dda4fd7d4ad3c41e:/wizard/app/__init__.py diff --git a/wizard/app/__init__.py b/wizard/app/__init__.py index adb9a18..929cacf 100644 --- a/wizard/app/__init__.py +++ b/wizard/app/__init__.py @@ -76,6 +76,9 @@ class Application(object): #: a conflict marker string and a result list. See :mod:`wizard.resolve` #: for more information. resolutions = {} + #: Instance of :class:`wizard.install.ArgSchema` that defines the arguments + #: this application requires. + install_schema = None def __init__(self, name): self.name = name self.versions = {} @@ -522,9 +525,18 @@ class Error(wizard.Error): """Generic error class for this module.""" pass -class NonfatalFailure(Error): - """Bad parameters given to installer.""" - pass +class RecoverableFailure(Error): + """ + The installer failed, but we were able to determine what the + error was, and should give the user a second chance if we were + running interactively. + """ + #: List of the errors that were found. + errors = None + def __init__(self, errors): + self.errors = errors + def __str__(self): + return """Installation failed due to the following errors: %s""" % ", ".join(self.errors) class NoRepositoryError(Error): """