Skip to content

Commit

Permalink
Use more specific JSONDecodeError
Browse files Browse the repository at this point in the history
Introduced in Python 3.5
  • Loading branch information
jdufresne committed Dec 31, 2020
1 parent acd27fe commit 3eeb083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piptools/cache.py
Expand Up @@ -37,7 +37,7 @@ def read_cache_file(cache_file_path):
with open(cache_file_path) as cache_file:
try:
doc = json.load(cache_file)
except ValueError:
except json.JSONDecodeError:
raise CorruptCacheError(cache_file_path)

# Check version and load the contents
Expand Down

0 comments on commit 3eeb083

Please sign in to comment.