[cli] Setup logging to unsilence stevedore errors, like failing to load an entrypoint.

This commit is contained in:
Romain Dorgueil
2017-05-28 23:02:34 +02:00
parent 0146fb0d55
commit ac800d2e14
2 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# This file has been auto-generated.
# All changes will be lost, see Projectfile.
#
# Updated at 2017-05-28 18:02:16.552433
# Updated at 2017-05-28 22:04:19.262686
PACKAGE ?= bonobo
PYTHON ?= $(shell which python)

View File

@ -5,6 +5,7 @@ from stevedore import ExtensionManager
def entrypoint(args=None):
logging.basicConfig()
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='command')
@ -19,9 +20,7 @@ def entrypoint(args=None):
except Exception:
logging.exception('Error while loading command {}.'.format(ext.name))
mgr = ExtensionManager(
namespace='bonobo.commands',
)
mgr = ExtensionManager(namespace='bonobo.commands')
mgr.map(register_extension)
args = parser.parse_args(args).__dict__