Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/178'
Browse files Browse the repository at this point in the history
* origin/pr/178:
  Fix data type issue

Pull request description:

I missed *one comma* in my earlier pull request for adding a Kicksecure template, so what should have been a one-item tuple got treated as a string. This bug is specifically in the line `if self.template.flavor in ("kicksecure-17"):` - if `self.template.flavor` is anything that is "in" the string "kicksecure-17", it will cause the Kicksecure code path to be followed incorrectly. Most notably `"" in ("kicksecure-17")` will resolve to True, i.e. an empty string will trigger this. To fix the bug, add a comma just after the `"kicksecure-17"` bit so that Python can figure out this is a tuple and not a string.
  • Loading branch information
marmarek committed Jan 21, 2025
2 parents fe07afa + bef6c1b commit b90374e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubesbuilder/plugins/template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def update_parameters(self, stage: str):
f"+whonix-gateway:{executor.get_sources_dir()}/template-whonix",
f"+whonix-workstation:{executor.get_sources_dir()}/template-whonix",
]
if self.template.flavor in ("kicksecure-17"):
if self.template.flavor in ("kicksecure-17",):
self.dependencies += [
ComponentDependency("template-kicksecure")
]
Expand Down

0 comments on commit b90374e

Please sign in to comment.