Fixed issue when container does not have a environment variables.
This commit is contained in:
parent
73bddc7bcc
commit
04e6d506a1
|
@ -47,6 +47,8 @@ def analyse_env_vars(inspect_data):
|
||||||
"""Extracts the environment variables from the given result of an 'inspect
|
"""Extracts the environment variables from the given result of an 'inspect
|
||||||
container' call."""
|
container' call."""
|
||||||
env_data = {}
|
env_data = {}
|
||||||
|
if not 'Env' in inspect_data['Config'] or inspect_data['Config']['Env'] is None:
|
||||||
|
return env_data
|
||||||
for env_var in inspect_data['Config']['Env']:
|
for env_var in inspect_data['Config']['Env']:
|
||||||
t = env_var.split("=")
|
t = env_var.split("=")
|
||||||
env_data[t[0]] = t[1]
|
env_data[t[0]] = t[1]
|
||||||
|
|
Loading…
Reference in New Issue