We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8e5aac commit a1f2aabCopy full SHA for a1f2aab
autocompose.py
@@ -80,14 +80,14 @@ def generate(cname):
80
'tty': cattrs['Config']['Tty']
81
}
82
83
+ networks = {}
84
if values['networks'] == set():
85
del values['networks']
-
86
- networklist = c.networks.list()
87
- networks = {}
88
- for network in networklist:
89
- if network.attrs['Name'] in values['networks']:
90
- 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'])}
91
92
# Check for command and add it if present.
93
if cattrs['Config']['Cmd'] != None:
0 commit comments