Kaydet (Commit) 933a303e authored tarafından Antoine Verlant's avatar Antoine Verlant

Fix the way the list of mounts is made for service.

Signed-off-by: 's avatarAntoine Verlant <antoine@niboo.be>
üst f127a9ff
...@@ -107,11 +107,14 @@ class ContainerSpec(dict): ...@@ -107,11 +107,14 @@ class ContainerSpec(dict):
if labels is not None: if labels is not None:
self['Labels'] = labels self['Labels'] = labels
if mounts is not None: if mounts is not None:
parsed_mounts = []
for mount in mounts: for mount in mounts:
if isinstance(mount, six.string_types): if isinstance(mount, six.string_types):
mounts.append(Mount.parse_mount_string(mount)) parsed_mounts.append(Mount.parse_mount_string(mount))
mounts.remove(mount) else:
self['Mounts'] = mounts # If mount already parsed
parsed_mounts.append(mount)
self['Mounts'] = parsed_mounts
if stop_grace_period is not None: if stop_grace_period is not None:
self['StopGracePeriod'] = stop_grace_period self['StopGracePeriod'] = stop_grace_period
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment