Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Commit

Permalink
catch json decode exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mbornstein committed Jan 30, 2017
1 parent 9e637af commit 7810704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def cache_lookup(metric_name, github_metrics):
with open(get_file_path(github_metrics), 'r') as data_file:
data = json.load(data_file)
return data[metric_name]
except (KeyError, FileNotFoundError):
except (KeyError, FileNotFoundError, json.decoder.JSONDecodeError):
return None


Expand Down

0 comments on commit 7810704

Please sign in to comment.