----- Original Message -----
From: "Vratislav Podzimek" <vpodzime(a)redhat.com>
To: "anaconda patch review" <anaconda-patches(a)lists.fedorahosted.org>
Sent: Wednesday, November 6, 2013 9:08:18 AM
Subject: Re: [rhel7] Avoid raising an exception if epdb module unavailable (#1026779)
On Wed, 2013-11-06 at 08:17 -0500, mulhern wrote:
> 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(a)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")
I'd use log.error() in this case, but otherwise ACK.
Ok, log.error it is.
- mulhern
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches