From 3eeb08322b21b9e17152d82e61029a4e0999921d Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 4 Dec 2020 07:43:44 -0800 Subject: [PATCH] Use more specific JSONDecodeError Introduced in Python 3.5 --- piptools/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piptools/cache.py b/piptools/cache.py index 7f4413154..027c180a6 100644 --- a/piptools/cache.py +++ b/piptools/cache.py @@ -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