forked from ungleich-public/cdist
Fix log level when verbosity option is not specified
This commit is contained in:
parent
90d9326740
commit
b657ba8221
2 changed files with 6 additions and 5 deletions
|
@ -21,6 +21,7 @@ parser = None
|
|||
|
||||
_verbosity_level_off = -2
|
||||
_verbosity_level = {
|
||||
None: logging.WARNING,
|
||||
_verbosity_level_off: logging.OFF,
|
||||
-1: logging.ERROR,
|
||||
0: logging.WARNING,
|
||||
|
|
|
@ -173,11 +173,11 @@ class Debian(object):
|
|||
env = vars(args)
|
||||
new_env = {}
|
||||
for key in env:
|
||||
if key == 'verbose':
|
||||
if env[key] >= 3:
|
||||
new_env['debug'] = "yes"
|
||||
elif env[key] == 2:
|
||||
new_env['verbose'] = "yes"
|
||||
if key == 'verbose' and env[key]:
|
||||
if env[key] >= 3:
|
||||
new_env['debug'] = "yes"
|
||||
elif env[key] == 2:
|
||||
new_env['verbose'] = "yes"
|
||||
elif not env[key]:
|
||||
new_env[key] = ''
|
||||
elif isinstance(env[key], bool) and env[key]:
|
||||
|
|
Loading…
Reference in a new issue