log tracebacks from importing formats
On Thu, 2012-02-09 at 14:58 -0800, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl@redhat.com>
>
> Sometimes a format module may have an error in it during development. It
> would be helpful to see the traceback to speed up debugging.
> ---
> pyanaconda/storage/formats/__init__.py | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Ack.
>
> diff --git a/pyanaconda/storage/formats/__init__.py b/pyanaconda/storage/formats/__init__.py
> index 4b0c122..3df470e 100644
> --- a/pyanaconda/storage/formats/__init__.py
> +++ b/pyanaconda/storage/formats/__init__.py
> @@ -108,7 +108,9 @@ def collect_device_format_classes():
> try:
> globals()[mod_name] = __import__(mod_name, globals(), locals(), [], -1)
> except ImportError:
> - log.debug("import of device format module '%s' failed" % mod_name)
> + log.error("import of device format module '%s' failed" % mod_name)
> + from traceback import format_exc
> + log.debug(format_exc())
>
> def get_device_format_class(fmt_type):
> """ Return an appropriate format class based on fmt_type. """
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
|