[PATCH 4/4] Hook up error handling in installer-specific methods. (#948250)

David Lehman dlehman at redhat.com
Fri Apr 5 17:11:08 UTC 2013


---
 blivet/__init__.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 68225c3..913ada5 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -31,6 +31,17 @@ ROOT_PATH = '/'
 shortProductName = ''
 productName = ''
 bootLoaderError = Exception
+ERROR_RAISE = 0
+
+class ErrorHandler(object):
+    def cb(self, *args, **kwargs):
+        return ERROR_RAISE
+
+errorHandler = ErrorHandler()
+
+##
+## end installer stubs
+##
 
 import os
 import time
@@ -89,6 +100,8 @@ def enable_installer_mode():
     global productName
     global get_bootloader
     global BootLoaderError
+    global errorHandler
+    global ERROR_RAISE
 
     from pyanaconda import isys
     from pyanaconda.constants import ROOT_PATH
@@ -96,6 +109,8 @@ def enable_installer_mode():
     from pyanaconda.constants import productName
     from pyanaconda.bootloader import get_bootloader
     from pyanaconda.bootloader import BootLoaderError
+    from pyanaconda.errors import errorHandler
+    from pyanaconda.errors import ERROR_RAISE
 
     from pyanaconda.anaconda_log import program_log_lock
     util.program_log_lock = program_log_lock
-- 
1.8.1.4



More information about the anaconda-patches mailing list