From: Kefu Chai Date: Wed, 18 Dec 2019 09:27:22 +0000 (+0800) Subject: provision: fix the error message when a distro image is not found X-Git-Tag: 1.1.0~174^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=126ac6af40a70c7d7d5795c6d7a560a070784808;p=teuthology.git provision: fix the error message when a distro image is not found Signed-off-by: Kefu Chai --- diff --git a/teuthology/provision/cloud/openstack.py b/teuthology/provision/cloud/openstack.py index 7ac87dcc6b..41088cdc60 100644 --- a/teuthology/provision/cloud/openstack.py +++ b/teuthology/provision/cloud/openstack.py @@ -333,10 +333,8 @@ class OpenStackProvisioner(base.Provisioner): break if not matches: raise RuntimeError( - "Could not find an image for %s %s", - self.os_type, - self.os_version, - ) + "Could not find an image for %s %s" % + (self.os_type, self.os_version)) return matches[0] @property diff --git a/teuthology/provision/fog.py b/teuthology/provision/fog.py index 993f30e3b9..e579bad0c6 100644 --- a/teuthology/provision/fog.py +++ b/teuthology/provision/fog.py @@ -155,10 +155,8 @@ class FOG(object): obj = resp.json() if not obj['count']: raise RuntimeError( - "Could not find an image for %s %s", - self.os_type, - self.os_version, - ) + "Could not find an image for %s %s" % + (self.os_type, self.os_version)) return obj['images'][0] def set_image(self, host_id):