summaryrefslogtreecommitdiffstats
path: root/pyanaconda/errors.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2012-10-16 15:23:54 -0400
committerChris Lumens <clumens@redhat.com>2012-10-16 17:28:08 -0400
commit9c41febe5747587046871d9525e8d4e66a7befb9 (patch)
tree717ae7c389900625440155d5584a35576dfcfbef /pyanaconda/errors.py
parent3a3a4d0e9b4933e6fe57f4204f5368ea802b63f5 (diff)
downloadanaconda-9c41febe5747587046871d9525e8d4e66a7befb9.tar.gz
anaconda-9c41febe5747587046871d9525e8d4e66a7befb9.tar.xz
anaconda-9c41febe5747587046871d9525e8d4e66a7befb9.zip
Add an error handler for fatal package installation errors (#865291).
We had everything except the function to display the error. Oops.
Diffstat (limited to 'pyanaconda/errors.py')
-rw-r--r--pyanaconda/errors.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
index 3b8de0452..89b76d566 100644
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -213,6 +213,14 @@ class ErrorHandler(object):
self.ui.showError(message)
return ERROR_RAISE
+ def _payloadInstallHandler(self, *args, **kwargs):
+ package = args[0]
+ message = _("There was an error installing the %s package. This is "
+ "a fatal error and installation will be aborted.") % \
+ package
+ self.ui.showError(message)
+ return ERROR_RAISE
+
def cb(self, exn, *args, **kwargs):
"""This method is the callback that all error handling should pass
through. The return value is one of the ERROR_* constants defined
@@ -244,7 +252,8 @@ class ErrorHandler(object):
"MediaUnmountError": self._mediaUnmountHandler,
"NoSuchGroup": self._noSuchGroupHandler,
"NoSuchPackage": self._noSuchPackageHandler,
- "ScriptError": self._scriptErrorHandler}
+ "ScriptError": self._scriptErrorHandler,
+ "PayloadInstallError": self._payloadInstallHandler}
if exn.__class__.__name__ in _map:
kwargs["exception"] = exn