fabric doesn't like fab_deploy.utils.IterableModule

Issue #48 resolved
Mikhail Korobov
repo owner created an issue

It seems fabric is not able to find tasks exposed as types.ModuleType subclass.

My fabfile has the following:

{{{ project = WebProject().expose_as_module('project')

apps = define_apps( django = Django( Nginx(), Apache(), ) )


"project" module is available at command-line, "apps" is not. After changing apps_module to be types.ModuleType('apps') in {{{fab_deploy.utils.define_apps}}} apps become available from console.

I think this may be fixed by introducing

{{{ def iter_public_attributes(module): return (getattr(module, attr) for attr in dir(module) if not attr.startswith('_')) }}}

utility and removing IterableModule.

Comments (7)

  1. Log in to comment