Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suite/util: fix KeyError in get_sha1s #1643

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions teuthology/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ def build_complete(self):
)
build_url = urljoin(self.query_url, path)

log.debug(f'Check build complete for results: {search_result}')
log.debug(f'Querying {build_url}...')
try:
resp = requests.get(build_url)
resp.raise_for_status()
Expand All @@ -1003,6 +1005,7 @@ def build_complete(self):
build['flavor'] == search_result['flavor'] and
build['distro_arch'] in search_result['archs']
):
log.debug(f'Matched build: {build}')
return build['status'] == 'completed'
return False

Expand Down
2 changes: 1 addition & 1 deletion teuthology/suite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def get_sha1s(project, committish, count):
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'])
int(count), sha1, project, resp.json()['err'])
return sha1s

# XXX don't do this every time?..
Expand Down