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_off = -2
|
||||||
_verbosity_level = {
|
_verbosity_level = {
|
||||||
|
None: logging.WARNING,
|
||||||
_verbosity_level_off: logging.OFF,
|
_verbosity_level_off: logging.OFF,
|
||||||
-1: logging.ERROR,
|
-1: logging.ERROR,
|
||||||
0: logging.WARNING,
|
0: logging.WARNING,
|
||||||
|
|
|
@ -173,7 +173,7 @@ class Debian(object):
|
||||||
env = vars(args)
|
env = vars(args)
|
||||||
new_env = {}
|
new_env = {}
|
||||||
for key in env:
|
for key in env:
|
||||||
if key == 'verbose':
|
if key == 'verbose' and env[key]:
|
||||||
if env[key] >= 3:
|
if env[key] >= 3:
|
||||||
new_env['debug'] = "yes"
|
new_env['debug'] = "yes"
|
||||||
elif env[key] == 2:
|
elif env[key] == 2:
|
||||||
|
|
Loading…
Reference in a new issue