[master/f21-branch] Do not install interactive exception handler in cmdline mode (#1155979)

Vratislav Podzimek vpodzime at redhat.com
Thu Oct 23 16:17:55 UTC 2014


The cmdline mode is, by definition, non-interactive so it doesn't make much
sense to use an interactive exception handler for it. However, we need to debug
the issues with cmdline mode sometimes so it is useful to have a way to force
the interactive exception handler even for the cmdline mode.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 anaconda | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/anaconda b/anaconda
index c0d1950..59046a9 100755
--- a/anaconda
+++ b/anaconda
@@ -1293,9 +1293,10 @@ if __name__ == "__main__":
     if image_count:
         anaconda.storage.setupDiskImages()
 
-    from pyanaconda import exception
-    # comment out the next line to make exceptions non-fatal
-    anaconda.mehConfig = exception.initExceptionHandling(anaconda)
+    # only install interactive exception handler in interactive modes
+    if ksdata.displaymode.displayMode != DISPLAY_MODE_CMDLINE or flags.debug:
+        from pyanaconda import exception
+        anaconda.mehConfig = exception.initExceptionHandling(anaconda)
 
     # add our own additional signal handlers
     signal.signal(signal.SIGUSR1, lambda signum, frame:
-- 
1.9.3



More information about the anaconda-patches mailing list