Skip to content

Commit

Permalink
Fix preseed value reading.
Browse files Browse the repository at this point in the history
  • Loading branch information
rnixx committed Oct 24, 2024
1 parent 1a46c02 commit b433fa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 1.0a8 (unreleased)


- Nothing changed yet.
- Fix preseed value reading.


## 1.0a7 (2024-10-24)
Expand Down
7 changes: 4 additions & 3 deletions src/mxmake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def create_config(
settings_question = []
for setting in settings:
sfqn = f"{domain.fqn}.{setting.name}"
setting_default = setting.default
setting_default: typing.Union[typing.Any, object] = setting.default
# use default setting from preseeds
if preseeds:
unset = object()
Expand All @@ -199,8 +199,9 @@ def create_config(
preseed_value = (
preseed_domain.get(setting.name, unset) if preseed_domain else unset
)
if preseed_value is unset:
preseed_value = setting_default
setting_default = (
preseed_value if preseed_value is not unset else setting_default
)
# use configured setting from parser if set
elif sfqn in parser.settings:
setting_default = parser.settings[sfqn]
Expand Down

0 comments on commit b433fa9

Please sign in to comment.