Skip to content

Commit

Permalink
Fix wrong dictionary access
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
oleorhagen committed Jan 8, 2024
1 parent 70ddb63 commit cbf88d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfbs/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down

0 comments on commit cbf88d7

Please sign in to comment.