]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite/util: add debug log for sha1s response
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Sun, 15 Mar 2020 00:26:06 +0000 (01:26 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Sun, 15 Mar 2020 00:35:24 +0000 (01:35 +0100)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/suite/util.py

index 06c221f6e2d4546e1a1fdebedcb216de29e303a0..b82c4f79a4394932601df092ce76ceb6454e0733 100644 (file)
@@ -5,6 +5,7 @@ import requests
 import smtplib
 import socket
 import subprocess
+import six
 import sys
 
 from email.mime.text import MIMEText
@@ -459,7 +460,8 @@ def find_git_parent(project, sha1):
         url = '%s/%s.git/refresh' % (base_url, project)
         resp = requests.get(url)
         if not resp.ok:
-            log.error('git refresh failed for %s: %s', project, resp.content)
+            log.error('git refresh failed for %s: %s',
+                      project, six.ensure_str(resp.content))
 
     def get_sha1s(project, committish, count):
         url = '/'.join((base_url, '%s.git' % project,
@@ -468,6 +470,7 @@ def find_git_parent(project, sha1):
         resp.raise_for_status()
         sha1s = resp.json()['sha1s']
         if len(sha1s) != count:
+            log.debug('got response: %s', resp.json())
             log.error('can''t find %d parents of %s in %s: %s',
                        int(count), sha1, project, resp.json()['error'])
         return sha1s