fix can't get a dict when Containers is None

Signed-off-by: hhHypo <i@ihypo.net>
This commit is contained in:
hhHypo 2017-04-26 01:41:07 +08:00
parent f127a9ffdc
commit 2d026fd1e5
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class Network(Model):
"""
return [
self.client.containers.get(cid) for cid in
self.attrs.get('Containers', {}).keys()
(self.attrs.get('Containers') or {}).keys()
]
def connect(self, container):