[PATCH 02/16] Modify collect so it works with directories with missing __init__.py
Vratislav Podzimek
vpodzime at redhat.com
Thu Dec 13 11:48:26 UTC 2012
On Thu, 2012-12-06 at 16:46 +0100, Martin Sivak wrote:
> ---
> pyanaconda/ui/common.py | 29 +++++++++++++++++++++--------
> 1 file changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
> index 3452a04..d5ff8af 100644
> --- a/pyanaconda/ui/common.py
> +++ b/pyanaconda/ui/common.py
> @@ -21,7 +21,7 @@
> #
>
> import os
> -import importlib
> +import imp
> import inspect
>
> class UIObject(object):
> @@ -380,19 +380,19 @@ class Hub(UIObject):
>
> def collect(module_pattern, path, pred):
> """Traverse the directory (given by path), import all files as a module
> - module_pattern % filename and find all classes withing that match
> + module_pattern % filename and find all classes within that match
> the given predicate. This is then returned as a list of classes.
>
> It is suggested you use collect_categories or collect_spokes instead of
> this lower-level method.
>
> :param module_pattern: the full name pattern (pyanaconda.ui.gui.spokes.%s)
> - of modules we about to import from path
> + we want to assign to imported modules
> :type module_pattern: string
>
> :param path: the directory we are picking up modules from
> :type path: string
> -
> +
Only added whitespace here ^^^^.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list