Skip to content

Commit

Permalink
Fix longest_module_key_length failing when the key did not exist
Browse files Browse the repository at this point in the history
Signed-off-by: jakub-nt <[email protected]>
  • Loading branch information
jakub-nt committed Jul 22, 2024
1 parent 9d0ad4d commit 95c5f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfbs/cfbs_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def save(self):
f.write(data)

def longest_module_key_length(self, key) -> int:
return max((len(m[key]) for m in self["build"])) if self.get("build") else 0
return max((len(m.get(key, "")) for m in self["build"])) if self.get("build") else 0

def add_with_dependencies(self, module, remote_config=None, dependent=None):
if type(module) is list:
Expand Down

0 comments on commit 95c5f62

Please sign in to comment.