浏览代码

Fix index error when getting ghost state of containers

Mark Steve Samson 11 年之前
父节点
当前提交
38c008e527
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fig/container.py

+ 1 - 1
fig/container.py

@@ -78,7 +78,7 @@ class Container(object):
     def human_readable_state(self):
     def human_readable_state(self):
         self.inspect_if_not_inspected()
         self.inspect_if_not_inspected()
         if self.dictionary['State']['Running']:
         if self.dictionary['State']['Running']:
-            if self.dictionary['State']['Ghost']:
+            if self.dictionary['State'].get('Ghost'):
                 return 'Ghost'
                 return 'Ghost'
             else:
             else:
                 return 'Up'
                 return 'Up'