Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from signalfx/env-none
Browse files Browse the repository at this point in the history
Fix case where env is None
  • Loading branch information
charless-splunk authored Apr 19, 2017
2 parents 6874267 + 5ec8e31 commit f97fec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dockerplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ def extract(self, client, container):
if provider == 'inspect' or provider == 'env':
raw = client.inspect_container(container)
env = {}
for element in map(lambda e: e.split('=', 1),
raw['Config']['Env']):
raw_env = raw['Config']['Env'] or []
for element in map(lambda e: e.split('=', 1), raw_env):
if len(element) == 2:
env[element[0]] = element[1]
elif len(element) == 1:
Expand Down

0 comments on commit f97fec3

Please sign in to comment.