Do not break build on missing curl results (#6516)

This commit is contained in:
Dan Albert 2019-10-23 11:04:15 -06:00 committed by GitHub
parent 26b8747014
commit 01fe7c90a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ data=json.load(sys.stdin)
if 'results' in data:
for result in data['results']:
print result['series'][0]['columns'][1].encode() + ': ' + str(result['series'][0]['values'][0][1])
if 'series' in result:
print result['series'][0]['columns'][1].encode() + ': ' + str(result['series'][0]['values'][0][1])
else:
print "No results returned from CURL request"