checkbox/checkbox — pull request #3 by zyga (2014-11-07 09:15:13+00:00)
Title: plainbo,checkbox: make config initialization lazy

This patch changes the config variable, that used to be passed around
between all the commands and their implementation, to the config_loader
function. The function, similar to the existing provider_loader, returns
a config object when called.

The CheckBoxInvocationMixIn from plainbox.impl.commands.inv_checkbox
(which is overdue for a rename) also gained a config property that lazily
calls the config_loader. This makes many command line tools oblivious
to this change as they can still access ``self.config`` in the same way.

The PlainBoxToolBase class lost it's init and late_init method, since they
no longer did anything useful. In exchange it gained the _load_config()
method which simply uses get_config_cls() to load and initialize the
configuration object. It is the same method that is passed to the
initializer of many command classes now.

Similar changes affected checkbox-ng's equivalent, the CheckBoxToolBase
class.

Signed-off-by: Zygmunt Krynicki