Fix bug in docker-toool where values are sometimes empty.
authorIan Main <imain@redhat.com>
Thu, 8 Jun 2017 22:56:55 +0000 (18:56 -0400)
committerIan Main <imain@redhat.com>
Thu, 8 Jun 2017 22:57:27 +0000 (18:57 -0400)
I was getting empty volumes from the json and it was creating bad
docker command lines.

Change-Id: Ie90fc1afa5711d6b029e98d621507b9cb70c1dbe

docker/docker-toool

index 36aba4a..0b87ea9 100755 (executable)
@@ -75,6 +75,9 @@ def parse_opts(argv):
 
 def docker_arg_map(key, value):
     value = str(value).encode('ascii', 'ignore')
+    if len(value) == 0:
+        return ''
+
     return {
         'environment': "--env=%s" % value,
         # 'image': value,