[master][PATCH] Fix checking if we are collecting our module
Chris Lumens
clumens at redhat.com
Tue Dec 10 14:27:29 UTC 2013
> diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
> index 627ae75..f85a144 100644
> --- a/pyanaconda/ui/common.py
> +++ b/pyanaconda/ui/common.py
> @@ -558,6 +558,7 @@ def collect(module_pattern, path, pred):
>
> mod_info = None
> module = None
> + module_path = None
>
> try:
> imp.acquire_lock()
> @@ -627,7 +628,7 @@ def collect(module_pattern, path, pred):
> continue
>
> except ImportError as imperr:
> - if "pyanaconda" in module_path:
> + if module_path and "pyanaconda" in module_path:
> # failure when importing our own module:
> raise
> log.error("Failed to import module in collect: %s", imperr)
Any idea why I've not seen this caught by pylint?
- Chris
More information about the anaconda-patches
mailing list