[rhel7] Avoid raising an exception if epdb module unavailable (#1026779)
mulhern
amulhern at redhat.com
Wed Nov 6 13:17:43 UTC 2013
Resolves: rhbz#1026779
Catch the exception and print an informative log message if the import fails.
The startDebugging method is a convenience for developers, and this seemed
to be the most useful approach for those I talked to.
With this approach, if the developer wants
to load epdb into their updates.img file they can still use the HUP signal
functionality without further edits.
Signed-off-by: mulhern <amulhern at redhat.com>
---
anaconda | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/anaconda b/anaconda
index ce37365..fd9c507 100755
--- a/anaconda
+++ b/anaconda
@@ -414,8 +414,11 @@ def check_memory(anaconda, opts, display_mode=None):
time.sleep(2)
def startDebugger(signum, frame):
- import epdb
- epdb.serve(skip=1)
+ try:
+ import epdb
+ epdb.serve(skip=1)
+ except ImportError:
+ log.info("Failed to start epdb remote debugging; epdb module import failed")
def setupDisplay(anaconda, opts, addon_paths=None):
from pyanaconda.ui.tui.simpleline import App
--
1.8.3.1
More information about the anaconda-patches
mailing list