]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
provision: fix the error message when a distro image is not found 1388/head
authorKefu Chai <kchai@redhat.com>
Wed, 18 Dec 2019 09:27:22 +0000 (17:27 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Dec 2019 09:27:22 +0000 (17:27 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/provision/cloud/openstack.py
teuthology/provision/fog.py

index 7ac87dcc6bf364826d11e2877c9066fa4db694a8..41088cdc608682b3c6ee5d35f270ab657402f7f3 100644 (file)
@@ -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
index 993f30e3b987b6681d7e82f3cac1aebd15ec9ead..e579bad0c6cdd1aae28f44d81ea7929e7231a7c9 100644 (file)
@@ -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):