[git-cl-try] Handle absence of builds

If there are no builds in build search response, the response is {}.
Handle this case.

R=qyearsley

Bug: 849361
Change-Id: I9f0472e140698a1d1c5b98b301bc562ac457785b
Reviewed-on: https://chromium-review.googlesource.com/1085899
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
changes/99/1085899/2
Nodir Turakulov 7 years ago committed by Commit Bot
parent 9ac59795af
commit 23d75d2db4

@ -351,7 +351,7 @@ def _buildbucket_retry(operation_name, http, *args, **kwargs):
raise BuildbucketResponseException(msg) raise BuildbucketResponseException(msg)
if response.status == 200: if response.status == 200:
if not content_json: if content_json is None:
raise BuildbucketResponseException( raise BuildbucketResponseException(
'Buildbucket returns invalid json content: %s.\n' 'Buildbucket returns invalid json content: %s.\n'
'Please file bugs at http://crbug.com, ' 'Please file bugs at http://crbug.com, '

Loading…
Cancel
Save