diff --git a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py index 78212cefd81e6e..8c3683859abe6b 100644 --- a/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py +++ b/scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py @@ -433,7 +433,7 @@ def _generate_onboarding_data(self): def main(): - parser = argparse.ArgumentParser(description="NrfConnect Factory Data NVS generator tool") + parser = argparse.ArgumentParser(description="nRF Connect Factory Data generator tool") def allow_any_int(i): return int(i, 0) def base64_str(s): return base64.b64decode(s) @@ -564,20 +564,20 @@ def base64_str(s): return base64.b64decode(s) if (exists(args.output + ".json") and not args.overwrite): log.error(("Output file: {} already exist, to create a new one add argument '--overwrite'. " "By default overwriting is disabled").format(args.output+".json")) - return + sys.exit(1) if args.schema and no_jsonschema_module: log.error(("Requested verification of the JSON file using jsonschema, but the module is not installed. \n" "Install only the module by invoking: pip3 install jsonschema \n" "Alternatively, install it with all dependencies for Matter by invoking: pip3 install " "-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory.")) - return + sys.exit(1) if args.generate_onboarding and no_onboarding_modules: log.error(("Requested generation of onboarding codes, but the some modules are not installed. \n" "Install all dependencies for Matter by invoking: pip3 install " "-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory.")) - return + sys.exit(1) generator = FactoryDataGenerator(args) generator.generate_json()