mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27601 from blueyed/dockerng-none-names
dockerng: handle None in container.Names
This commit is contained in:
commit
f7f48d1eef
1 changed files with 1 additions and 1 deletions
|
@ -2130,7 +2130,7 @@ def list_containers(**kwargs):
|
|||
'''
|
||||
ret = set()
|
||||
for item in six.itervalues(ps_(all=kwargs.get('all', False))):
|
||||
for c_name in [x.lstrip('/') for x in item.get('Names', [])]:
|
||||
for c_name in [x.lstrip('/') for x in item.get('Names', []) or []]:
|
||||
ret.add(c_name)
|
||||
return sorted(ret)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue