Skip to content

Commit

Permalink
Fix return value of execute_command
Browse files Browse the repository at this point in the history
  • Loading branch information
yhaliaw committed Jul 4, 2023
1 parent 0d52bcf commit 7d5693b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def refresh_firewall(self, denylist: typing.List[FirewallEntry]):
current_acls = [
acl["name"]
for acl in yaml.safe_load(
execute_command(["lxc", "network", "acl", "list", "-f", "yaml"])
execute_command(["lxc", "network", "acl", "list", "-f", "yaml"])[0]
)
]
if self._ACL_RULESET_NAME not in current_acls:
Expand All @@ -99,7 +99,7 @@ def refresh_firewall(self, denylist: typing.List[FirewallEntry]):
]
)
acl_config = yaml.safe_load(
execute_command(["/snap/bin/lxc", "network", "acl", "show", self._ACL_RULESET_NAME])
execute_command(["/snap/bin/lxc", "network", "acl", "show", self._ACL_RULESET_NAME])[0]
)
host_ip = self.get_host_ip()
egress_rules = [
Expand Down

0 comments on commit 7d5693b

Please sign in to comment.