summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorVratislav Podzimek <vpodzime@redhat.com>2012-09-12 14:28:35 +0200
committerVratislav Podzimek <vpodzime@redhat.com>2012-09-17 13:34:45 +0200
commitcbe9bfca7a7d40b72cd3c59b6f9a5b56cc36f1eb (patch)
tree1ff731a089df0a1982782771fc079430a9fa1c66 /anaconda
parent6230fccea6f43c0d44e17fdbd6d89f4d7d1e01fc (diff)
downloadanaconda-cbe9bfca7a7d40b72cd3c59b6f9a5b56cc36f1eb.tar.gz
anaconda-cbe9bfca7a7d40b72cd3c59b6f9a5b56cc36f1eb.tar.xz
anaconda-cbe9bfca7a7d40b72cd3c59b6f9a5b56cc36f1eb.zip
Add a way to test exception handling
Instead of adding command line option throwing exception in one place of the code, let's use SIGURS1 as signal for raising exception in anaconda. This way, it is possible to raise exception in different phases of the installation and we can add code to prepare worst case scenario testing as much resolved bugs in exception handling as possible.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda6
1 files changed, 4 insertions, 2 deletions
diff --git a/anaconda b/anaconda
index c1f6ba8cd..f3b51124f 100755
--- a/anaconda
+++ b/anaconda
@@ -906,12 +906,14 @@ if __name__ == "__main__":
# sets yum's multilib_policy to "all" (as opposed to "best")
ksdata.packages.multiLib = opts.multiLib
+ from pyanaconda import exception
if anaconda.displayMode == 'g':
# comment out the next line to make exceptions non-fatal
- from pyanaconda.exception import initExceptionHandling
- anaconda.mehConfig = initExceptionHandling(anaconda)
+ anaconda.mehConfig = exception.initExceptionHandling(anaconda)
# add our own additional signal handlers
+ signal.signal(signal.SIGUSR1, lambda signum, frame:
+ exception.test_exception_handling())
signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
if opts.lang: