Check for an existing docker_network before trying to modify it (#24048)

This eliminates a TypeError in check mode.
This commit is contained in:
Stephen Jennings 2017-08-23 09:10:53 -07:00 committed by ansibot
parent b1df75fc1c
commit be2d4cc1c9

View file

@ -308,6 +308,8 @@ class DockerNetworkManager(object):
self.results['changed'] = True
def disconnect_missing(self):
if not self.existing_network:
return
containers = self.existing_network['Containers']
if not containers:
return