Check self.parameters.env exists.

This commit is contained in:
chouseknecht 2016-05-29 09:36:17 -04:00
parent c419d351c5
commit cba5b37c9f
No known key found for this signature in database
GPG key ID: 78F1698C5705A81B

View file

@ -1278,7 +1278,8 @@ class Container(DockerBaseClass):
for env_var in image['ContainerConfig']['Env']:
parts = env_var.split('=')
expected_env[parts[0]] = parts[1]
expected_env.update(self.parameters.env)
if self.parameters.env:
expected_env.update(self.parameters.env)
param_env = []
for key, value in expected_env.items():
param_env.append("%s=%s" % (key, value))