Skip to content

Commit 51bf91a

Browse files
committed
refactor: cosmetic
1 parent cbb9777 commit 51bf91a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

supervisor/docker/network.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ def _get_network(self) -> docker.models.networks.Network:
8181
except docker.errors.NotFound:
8282
_LOGGER.info("Can't find Supervisor network, creating a new network")
8383

84-
ip6am_pool = docker.types.IPAMPool(subnet=str(DOCKER_IPV6_NETWORK_MASK))
85-
86-
ip4am_pool = docker.types.IPAMPool(
87-
subnet=str(DOCKER_IPV4_NETWORK_MASK),
88-
gateway=str(self.gateway),
89-
iprange=str(DOCKER_IPV4_NETWORK_RANGE),
84+
ipam_config = docker.types.IPAMConfig(
85+
ool_configs=[
86+
docker.types.IPAMPool(subnet=str(DOCKER_IPV6_NETWORK_MASK)),
87+
docker.types.IPAMPool(
88+
subnet=str(DOCKER_IPV4_NETWORK_MASK),
89+
gateway=str(self.gateway),
90+
iprange=str(DOCKER_IPV4_NETWORK_RANGE),
91+
),
92+
]
9093
)
9194

92-
ipam_config = docker.types.IPAMConfig(pool_configs=[ip6am_pool, ip4am_pool])
93-
9495
return self.docker.networks.create(
9596
DOCKER_NETWORK,
9697
driver="bridge",

0 commit comments

Comments
 (0)