]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
provision.fog: Be more informative re: API errors 2009/head
authorZack Cerza <zack@redhat.com>
Thu, 24 Oct 2024 17:54:29 +0000 (11:54 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 24 Oct 2024 17:54:32 +0000 (11:54 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/provision/fog.py

index 12914f2960aa13998facce66da9b42565e17c5ff..101da2464d3b4581d25f93288e09a002b1966a6f 100644 (file)
@@ -119,8 +119,8 @@ class FOG(object):
         )
         prepped = req.prepare()
         resp = requests.Session().send(prepped)
-        if not resp.ok and resp.text:
-            self.log.error("%s: %s", resp.status_code, resp.text)
+        if not resp.ok:
+            self.log.error(f"Got status {resp.status_code} from {url_suffix}: '{resp.text}'")
         if verify:
             resp.raise_for_status()
         return resp