modules management: fix, enh&clean of load/import module functions.

Fix: now possible to import as true packages the shinken modules. 
Even if they do relative import. So we don't over populate sys.path with every module path.

Enh: Daemon: set modulesctx.modules_dir when modules_manager is loaded.

Clean: ModulesContext.get_module() and ModulesManager.load().
Factorization should be easily do-able.

Else at the end of a loop statement isn't common, even if this is python
syntax.
I agree we should avoid such "dev" syntax.


2014-10-20 21:15 GMT+02:00 Sébastien Coavoux <notifications@github.com>:

> In shinken/modulesmanager.py:
>
> >                      break
> > -            if not is_find:
> > -                # No module is suitable, we Raise a Warning
> > -                logger.warning("The module type %s for %s was not found in modules!", module_type, mod_conf.get_name())
> > +            else: # No module is suitable, we emit a Warning
>
>  Remember that most of the contributors are NOT dev :) They are admins
> that help to code with new features, and I won't allow too much magic that
> can hurt their contribution :)
>
> That's why we are here to review every pull request : ensure code quality.
> IMO this is not magic, just using python syntax. This kind of use is fine
> as long as comment are clear.
>
> Ps: I already let a dev make its magic in the project, and we work lot of
> hours to get back to a maintainable state. Never again :)
>
> Then it was not a good one :) Travis and Jenkins are here to avoid such
> fail.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/naparuba/shinken/pull/1348/files#r19106641>.
>