From 31bce95b090a205ba9da8bdf8f385ac412b170a0 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 30 Apr 2015 14:21:51 -0400 Subject: -v trumps -d on the CLI This patch updates the handling of the --debug and --verbose options so that if both are specified then log level is set to DEBUG. Change-Id: I65d5665631f5575d1c8343bb7c1b197a61e0e176 Closes-bug: #1450586 --- os_net_config/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'os_net_config/cli.py') diff --git a/os_net_config/cli.py b/os_net_config/cli.py index c3a6358..aeccb26 100644 --- a/os_net_config/cli.py +++ b/os_net_config/cli.py @@ -99,10 +99,10 @@ def configure_logger(verbose=False, debug=False): DATE_FORMAT = '%Y/%m/%d %I:%M:%S %p' log_level = logging.WARN - if verbose: - log_level = logging.INFO - elif debug: + if debug: log_level = logging.DEBUG + elif verbose: + log_level = logging.INFO logging.basicConfig(format=LOG_FORMAT, datefmt=DATE_FORMAT, level=log_level) -- cgit 1.2.3-korg