From 126ac6af40a70c7d7d5795c6d7a560a070784808 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 18 Dec 2019 17:27:22 +0800 Subject: [PATCH] provision: fix the error message when a distro image is not found Signed-off-by: Kefu Chai --- teuthology/provision/cloud/openstack.py | 6 ++---- teuthology/provision/fog.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) 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): -- 2.39.5