From d99f26e3cf84712098e176445d94014a55ee7d51 Mon Sep 17 00:00:00 2001 From: ldericher Date: Wed, 19 Aug 2020 17:42:09 +0200 Subject: [PATCH] exit status --- src/kiwi-config.py | 3 ++- src/kiwi/__init__.py | 2 +- src/kiwi/subcommands/init.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kiwi-config.py b/src/kiwi-config.py index 4c5acad..7435727 100755 --- a/src/kiwi-config.py +++ b/src/kiwi-config.py @@ -31,7 +31,8 @@ def main(): set_verbosity(logging.getLogger(), log_handler, kiwi.verbosity()) # run the app - kiwi.run() + if not kiwi.run(): + quit(1) if __name__ == "__main__": diff --git a/src/kiwi/__init__.py b/src/kiwi/__init__.py index 8a4a6db..ba8912f 100644 --- a/src/kiwi/__init__.py +++ b/src/kiwi/__init__.py @@ -11,7 +11,7 @@ def verbosity(): def run(): # pass down - Runner().run() + return Runner().run() __all__ = [ diff --git a/src/kiwi/subcommands/init.py b/src/kiwi/subcommands/init.py index 0a2cc4e..7e0fa59 100644 --- a/src/kiwi/subcommands/init.py +++ b/src/kiwi/subcommands/init.py @@ -29,7 +29,7 @@ class InitCommand(SubCommand): def __init__(self): super().__init__( 'init', - action="Creating", + action=f"Initializing '{KIWI_CONF_NAME}' in", description="Create a new kiwi-config instance" ) @@ -41,7 +41,6 @@ class InitCommand(SubCommand): ) def _run_instance(self, runner, args): - logging.info(f"Initializing '{KIWI_CONF_NAME}' in '{os.getcwd()}'") config = LoadedConfig.get() # check force switch