docker_compose - use valid variable in exception message (#60020)

This commit is contained in:
Sam Doran 2019-08-02 15:57:22 -04:00 committed by GitHub
parent 5b349a28d4
commit a9fe21bc62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- docker_compose - correct variable used in warning message about default IP

View file

@ -1508,9 +1508,9 @@ class TaskParameters(DockerBaseClass):
network.get('Options', {}).get('com.docker.network.bridge.host_binding_ipv4'):
ip = network['Options']['com.docker.network.bridge.host_binding_ipv4']
break
except NotFound as dummy:
except NotFound as nfe:
self.client.fail(
"Cannot inspect the network '{0}' to determine the default IP: {1}".format(net['name'], e),
"Cannot inspect the network '{0}' to determine the default IP: {1}".format(net['name'], nfe),
exception=traceback.format_exc()
)
return ip