[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[master] log tracebacks from importing formats



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(-)

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. """
-- 
1.7.6.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]