浏览代码

e.explanation a 'str' object

Christopher Grebs 11 年之前
父节点
当前提交
9bec059cc7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fig/service.py

+ 1 - 1
fig/service.py

@@ -67,7 +67,7 @@ class Service(object):
         try:
             return Container.create(self.client, **container_options)
         except APIError as e:
-            if e.response.status_code == 404 and e.explanation and 'No such image' in e.explanation:
+            if e.response.status_code == 404 and e.explanation and 'No such image' in str(e.explanation):
                 log.info('Pulling image %s...' % container_options['image'])
                 self.client.pull(container_options['image'])
                 return Container.create(self.client, **container_options)