FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-09-2012, 09:58 PM
"Brian C. Lane"
 
Default 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-09-2012, 11:30 PM
David Lehman
 
Default 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
 

Thread Tools




All times are GMT. The time now is 07:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org