1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +00:00

"-v" switch in main program

This commit is contained in:
Jörn-Michael Miehe 2020-08-10 17:39:15 +02:00
parent 90caad4aba
commit ceb4bc0430
2 changed files with 5 additions and 6 deletions

View file

@ -2,7 +2,6 @@
import logging import logging
import kiwi import kiwi
from kiwi.subcommands import *
def set_verbosity(logger, handler, verbosity): def set_verbosity(logger, handler, verbosity):
@ -21,6 +20,11 @@ def set_verbosity(logger, handler, verbosity):
def main(): def main():
kiwi.Parser().get_parser().add_argument(
'-v', '--verbosity',
action='count', default=0
)
args = kiwi.Parser().get_args() args = kiwi.Parser().get_args()
log_handler = logging.StreamHandler() log_handler = logging.StreamHandler()

View file

@ -17,11 +17,6 @@ class Parser:
def __init__(self): def __init__(self):
self.__parser = argparse.ArgumentParser(description='kiwi-config') 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 = self.__parser.add_subparsers()
self.__subparsers.required = True self.__subparsers.required = True
self.__subparsers.dest = 'command' self.__subparsers.dest = 'command'