Skip to content

Commit

Permalink
fixed ValueError: No JSON object could be decoded in guardian spark c…
Browse files Browse the repository at this point in the history
…hecker
  • Loading branch information
garyelephant committed Jul 6, 2018
1 parent 2481273 commit ac151b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spark_checker/streaming_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def streaming_batch_stats(master_url, application_id, status=None, timeout=20):
if resp.status_code != 200:
continue

stats_json = resp.json()
try:
stats_json = resp.json()
except ValueError as e:
stats_json = None

break

if stats_json is None:
Expand Down

0 comments on commit ac151b7

Please sign in to comment.