e.explanation a 'str' object

This commit is contained in:
Christopher Grebs 2014-01-05 19:32:06 -08:00 committed by Ben Firshman
parent f600fa8bf3
commit 9bec059cc7
1 changed files with 1 additions and 1 deletions

View File

@ -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)