Skip to content

Commit 3f75623

Browse files
committed
command property: replace string concatenation by taking over given list
1 parent b9c096d commit 3f75623

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autocompose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ def generate(cname):
9494
networks[network.attrs['Name']] = {'external': (not network.attrs['Internal'])}
9595

9696
# Check for command and add it if present.
97-
if cattrs['Config']['Cmd'] != None:
98-
values['command'] = " ".join(cattrs['Config']['Cmd']),
97+
if cattrs['Config']['Cmd'] is not None:
98+
values['command'] = cattrs['Config']['Cmd']
9999

100100
# Check for exposed/bound ports and add them if needed.
101101
try:
102-
expose_value = list(cattrs['Config']['ExposedPorts'].keys())
102+
expose_value = list(cattrs['Config']['ExposedPorts'].keys())
103103
ports_value = [cattrs['HostConfig']['PortBindings'][key][0]['HostIp']+':'+cattrs['HostConfig']['PortBindings'][key][0]['HostPort']+':'+key for key in cattrs['HostConfig']['PortBindings']]
104104

105105
# If bound ports found, don't use the 'expose' value.

0 commit comments

Comments
 (0)