Skip to content

Commit

Permalink
Log some information when retrieving CI status from greenwave via bodhi
Browse files Browse the repository at this point in the history
This way when running with --debug, we should be able to have more clues
as to what is going on (if anything).

Signed-off-by: Pierre-Yves Chibon <[email protected]>
  • Loading branch information
pypingou committed Jul 26, 2018
1 parent bc7b327 commit fa15397
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bodhi/client/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@ def update_str(self, update, minimal=False):

try:
test_status = self.get_test_status(update['alias'])
except (ServerError, requests.exceptions.RequestException):
except (ServerError, requests.exceptions.RequestException) as err:
log.debug('ERROR while retrieving CI status: %s', err)
test_status = None

if test_status:
Expand All @@ -776,6 +777,8 @@ def update_str(self, update, minimal=False):
info = '\n'.join([el.description for el in test_status.errors])
elif 'decision' in test_status:
info = test_status.decision.summary
else:
log.debug('No `errors` nor `decision` in the data returned')
if info:
update_lines.append(line_formatter.format('CI Status', info))

Expand Down

0 comments on commit fa15397

Please sign in to comment.