diff --git a/src/kiwi-config.py b/src/kiwi-config.py index 55effc2..737fe98 100755 --- a/src/kiwi-config.py +++ b/src/kiwi-config.py @@ -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() diff --git a/src/kiwi/core.py b/src/kiwi/core.py index 86ccff6..9f06fa7 100644 --- a/src/kiwi/core.py +++ b/src/kiwi/core.py @@ -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'