[cli] implements bonobo run -m <module> and bonobo run <path>. Also adds --quiet option implementation and --verbose option that sets the DEBUG setting on.

This commit is contained in:
Romain Dorgueil
2017-05-22 14:05:57 +02:00
parent 39e083e594
commit 4e4a3581c9
4 changed files with 50 additions and 30 deletions

View File

@ -9,8 +9,16 @@ def to_bool(s):
return False
# Debug mode.
# Debug/verbose mode.
DEBUG = to_bool(os.environ.get('BONOBO_DEBUG', 'f'))
# Profile mode.
PROFILE = to_bool(os.environ.get('BONOBO_PROFILE', 'f'))
# Quiet mode.
QUIET = to_bool(os.environ.get('BONOBO_QUIET', 'f'))
def check():
if DEBUG and QUIET:
raise RuntimeError('I cannot be verbose and quiet at the same time.')