Skip to content

Commit 5a04cf1

Browse files
committed
fix error when running hubble without -v
1 parent 3d42bca commit 5a04cf1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hubblestack/daemon.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ def _setup_signaling():
512512
signal.signal(signal.SIGHUP, clean_up_process)
513513
signal.signal(signal.SIGQUIT, clean_up_process)
514514

515-
516515
def _disable_boto_modules():
517516
""" Disable the unneeded boto modules because they cause issues with the loader """
518517
# Disable all of salt's boto modules, they give nothing but trouble to the loader
@@ -636,12 +635,13 @@ def _setup_logging(parsed_args):
636635
if __opts__['daemonize']:
637636
__opts__['log_level'] = 'info'
638637
# Handle the explicit -vvv settings
639-
if __opts__['verbose'] == 1:
640-
__opts__['log_level'] = 'warning'
641-
elif __opts__['verbose'] == 2:
642-
__opts__['log_level'] = 'info'
643-
elif __opts__['verbose'] >= 3:
644-
__opts__['log_level'] = 'debug'
638+
if __opts__['verbose']:
639+
if __opts__['verbose'] == 1:
640+
__opts__['log_level'] = 'warning'
641+
elif __opts__['verbose'] == 2:
642+
__opts__['log_level'] = 'info'
643+
elif __opts__['verbose'] >= 3:
644+
__opts__['log_level'] = 'debug'
645645
# Console logging is probably the same, but can be different
646646
console_logging_opts = {
647647
'log_level': __opts__.get('console_log_level', __opts__['log_level']),

0 commit comments

Comments
 (0)