diff --git a/alice-ci/setup.cfg b/alice-ci/setup.cfg index 6ae9541..515afc6 100644 --- a/alice-ci/setup.cfg +++ b/alice-ci/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = alice-ci -version = 0.0.12 +version = 0.0.13 author = Daniel Gyulai description = Alice CI framework long_description = file: README.md diff --git a/alice-ci/src/alice/runners/pypirepo.py b/alice-ci/src/alice/runners/pypirepo.py index 3fd6bee..7b79c45 100644 --- a/alice-ci/src/alice/runners/pypirepo.py +++ b/alice-ci/src/alice/runners/pypirepo.py @@ -1,4 +1,5 @@ import logging +from weakref import KeyedRef import docker from os.path import join, isdir from os import getcwd, mkdir @@ -64,7 +65,10 @@ class PypiRepoRunner: docker_host_ip = None for network in self.client.networks.list(): if network.name == "bridge": - docker_host_ip = network.attrs["IPAM"]["Config"][0]["Gateway"] + try: + docker_host_ip = network.attrs["IPAM"]["Config"][0]["Gateway"] + except KeyError: + docker_host_ip = network.attrs["IPAM"]["Config"][0]["Subnet"].replace(".0/16", ".1") if docker_host_ip is None: raise RunnerError("Unable to determine Docker host IP")