diff options
author | Vratislav Podzimek <vpodzime@redhat.com> | 2012-09-12 14:28:35 +0200 |
---|---|---|
committer | Vratislav Podzimek <vpodzime@redhat.com> | 2012-09-17 13:34:45 +0200 |
commit | cbe9bfca7a7d40b72cd3c59b6f9a5b56cc36f1eb (patch) | |
tree | 1ff731a089df0a1982782771fc079430a9fa1c66 /anaconda | |
parent | 6230fccea6f43c0d44e17fdbd6d89f4d7d1e01fc (diff) | |
download | anaconda-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-x | anaconda | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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: |