Commit b657ba82 authored by Darko Poljak's avatar Darko Poljak

Fix log level when verbosity option is not specified

parent 90d93267
......@@ -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]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment