Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provision: reload the firewall only once #1846

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
undo an autoformater edit
  • Loading branch information
OniriCorpe committed May 20, 2024
commit b8b683bd660d36866f31329ac33b46225df07a51
8 changes: 2 additions & 6 deletions src/utils/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,9 +1153,7 @@ def __init__(self, properties: Dict[str, Any], *args, **kwargs):

for key, values in self.extras.items():
if isinstance(values.get("packages"), str):
values["packages"] = [
value.strip() for value in values["packages"].split(",")
] # type: ignore
values["packages"] = [value.strip() for value in values["packages"].split(",")] # type: ignore

if isinstance(values.get("packages_from_raw_bash"), str):
out, err = self.check_output_bash_snippet(
Expand All @@ -1166,9 +1164,7 @@ def __init__(self, properties: Dict[str, Any], *args, **kwargs):
f"Error while running apt resource packages_from_raw_bash snippet for '{key}' extras:"
)
logger.error(err)
values["packages"] = values.get("packages", []) + [
value.strip() for value in out.split("\n")
] # type: ignore
values["packages"] = values.get("packages", []) + [value.strip() for value in out.split("\n")] # type: ignore

if (
not isinstance(values.get("repo"), str)
Expand Down
Loading