]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/__init__.py
Expand documentation.
[wizard.git] / wizard / app / __init__.py
index adb9a189b6be8bbd58f557c5c47b781c888c2306..929cacfb35c66715e3ba2999da46cafaf875e243 100644 (file)
@@ -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):
     """