mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Avoid key error if 'Status' is not present in container info.
- assumes container is not running if 'Status' not present
This commit is contained in:
parent
c34c6b992f
commit
1199218bec
@ -2279,7 +2279,7 @@ def ps_(**kwargs):
|
||||
continue
|
||||
for item in container:
|
||||
c_state = 'running' \
|
||||
if container['Status'].lower().startswith('up ') \
|
||||
if container.get('Status', '').lower().startswith('up ') \
|
||||
else 'stopped'
|
||||
bucket = __context__.setdefault('docker.ps', {}).setdefault(
|
||||
c_state, {})
|
||||
|
Loading…
Reference in New Issue
Block a user