From: Juan Antonio Osorio Robles Date: Thu, 16 Mar 2017 11:20:41 +0000 (+0200) Subject: docker-puppet: skip empty volume entries X-Git-Tag: opnfv-6.0.0~875^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=7f5c616a949dc1649ac22484d7fd059b04cae6c5;p=apex-tripleo-heat-templates.git docker-puppet: skip empty volume entries This allows to optionally add volumes, where we could use a heat conditional to either put the volume path we want or put an empty string which should be safely skipped. Change-Id: I68f91ffdd8ceb14735adad1322fcf124c47b160c --- diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index 0f079436..8f95208f 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -205,7 +205,8 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume '--volume', '%s:%s:rw' % (sh_script, sh_script) ] for volume in volumes: - dcmd.extend(['--volume', volume]) + if volume: + dcmd.extend(['--volume', volume]) dcmd.extend(['--entrypoint', sh_script])