"-v" switch in main program
This commit is contained in:
parent
90caad4aba
commit
ceb4bc0430
2 changed files with 5 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
|||
import logging
|
||||
|
||||
import kiwi
|
||||
from kiwi.subcommands import *
|
||||
|
||||
|
||||
def set_verbosity(logger, handler, verbosity):
|
||||
|
@ -21,6 +20,11 @@ def set_verbosity(logger, handler, verbosity):
|
|||
|
||||
|
||||
def main():
|
||||
kiwi.Parser().get_parser().add_argument(
|
||||
'-v', '--verbosity',
|
||||
action='count', default=0
|
||||
)
|
||||
|
||||
args = kiwi.Parser().get_args()
|
||||
|
||||
log_handler = logging.StreamHandler()
|
||||
|
|
|
@ -17,11 +17,6 @@ class Parser:
|
|||
def __init__(self):
|
||||
self.__parser = argparse.ArgumentParser(description='kiwi-config')
|
||||
|
||||
self.__parser.add_argument(
|
||||
'-v', '--verbosity',
|
||||
action='count', default=0
|
||||
)
|
||||
|
||||
self.__subparsers = self.__parser.add_subparsers()
|
||||
self.__subparsers.required = True
|
||||
self.__subparsers.dest = 'command'
|
||||
|
|
Loading…
Reference in a new issue