Merge "github: log the project name when getBranches fails"

This commit is contained in:
Zuul 2019-03-19 20:59:40 +00:00 committed by Gerrit Code Review
commit 2fae91c797
1 changed files with 3 additions and 0 deletions

View File

@ -1102,6 +1102,9 @@ class GithubConnection(BaseConnection):
self.log.warning(
"Rate limit exceeded, using empty branch list")
return []
elif resp.status_code == 404:
raise Exception("Got status code 404 when lising branches "
"of project %s" % project.name)
branches.extend([x['name'] for x in resp.json()])