If an addon or something like that fails to be imported we may want to just log an error, but if an import of our own module fails it is a bug.
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- pyanaconda/ui/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py index 2bae250..bc1009e 100644 --- a/pyanaconda/ui/common.py +++ b/pyanaconda/ui/common.py @@ -567,8 +567,11 @@ def collect(module_pattern, path, pred): # skip the file as well if not module_flags[0].startswith(".py") and loaded_ext.startswith(".py"): continue - + except ImportError as imperr: + if "pyanaconda" in module_path: + # failure when importing our own module: + raise log.error("Failed to import module in collect: %s" % imperr) continue finally:
Ack.
On Mon, Apr 22, 2013 at 01:37:27PM +0200, Vratislav Podzimek wrote:
If an addon or something like that fails to be imported we may want to just log an error, but if an import of our own module fails it is a bug.
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com
pyanaconda/ui/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py index 2bae250..bc1009e 100644 --- a/pyanaconda/ui/common.py +++ b/pyanaconda/ui/common.py @@ -567,8 +567,11 @@ def collect(module_pattern, path, pred): # skip the file as well if not module_flags[0].startswith(".py") and loaded_ext.startswith(".py"): continue
except ImportError as imperr:
if "pyanaconda" in module_path:
# failure when importing our own module:
raise log.error("Failed to import module in collect: %s" % imperr) continue finally:
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
If an addon or something like that fails to be imported we may want to just log an error, but if an import of our own module fails it is a bug.
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com
You know, I'd been wondering why this wasn't happening. ACK.
- Chris
anaconda-patches@lists.fedorahosted.org