kas: Load plugins in kas_get_argparser()

This fixes the missing sub-command entries in the User Guide section of
the docs by allowing the commands and arguments introduced by the
plugins to be seen by sphinx when building the docs.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Paul Barker 2020-11-06 12:50:19 +01:00 committed by Jan Kiszka
parent 4e153a2872
commit bad24e7468

View File

@ -109,6 +109,12 @@ def kas_get_argparser():
"""
Creates an argparser for kas with all plugins.
"""
# Load plugins here so that the commands and arguments introduced by the
# plugins can be seen by sphinx when it calls this function to build the
# documentation
plugins.load()
parser = argparse.ArgumentParser(description='kas - setup tool for '
'bitbake based project')
@ -136,7 +142,6 @@ def kas(argv):
The actual main entry point of kas.
"""
create_logger()
plugins.load()
parser = kas_get_argparser()
args = parser.parse_args(argv)