From cbf88d7c3ad11d38b083d9d56436f44278e64a12 Mon Sep 17 00:00:00 2001 From: Ole Petter Date: Mon, 8 Jan 2024 15:35:13 +0100 Subject: [PATCH] Fix wrong dictionary access The dictionary is accessed, expecting a None on non-existing keys, but mistakenly uses the `[]` bracket syntax for indexing, as opposed to `.get` which will return `None` on non-existing keys. Signed-off-by: Ole Petter --- cfbs/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfbs/commands.py b/cfbs/commands.py index d48d0737..2fe05548 100644 --- a/cfbs/commands.py +++ b/cfbs/commands.py @@ -309,7 +309,7 @@ def status_command() -> int: print("Description: %s" % config["description"]) print("File: %s" % cfbs_filename()) - modules = config["build"] + modules = config.get("build") if not modules: return 0 print("\nModules:")