mirror of
https://github.com/Red5d/docker-autocompose
synced 2026-01-02 22:58:01 +00:00
Fix lines that depend on the 'networks' key being in values list
This commit is contained in:
@@ -80,14 +80,14 @@ def generate(cname):
|
||||
'tty': cattrs['Config']['Tty']
|
||||
}
|
||||
|
||||
networks = {}
|
||||
if values['networks'] == set():
|
||||
del values['networks']
|
||||
|
||||
networklist = c.networks.list()
|
||||
networks = {}
|
||||
for network in networklist:
|
||||
if network.attrs['Name'] in values['networks']:
|
||||
networks[network.attrs['Name']] = {'external': (not network.attrs['Internal'])}
|
||||
else:
|
||||
networklist = c.networks.list()
|
||||
for network in networklist:
|
||||
if network.attrs['Name'] in values['networks']:
|
||||
networks[network.attrs['Name']] = {'external': (not network.attrs['Internal'])}
|
||||
|
||||
# Check for command and add it if present.
|
||||
if cattrs['Config']['Cmd'] != None:
|
||||
|
||||
Reference in New Issue
Block a user