X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/4dd100bff283b3c60ce67491dd53f47b45f68ac2..b8df7e4b10bca2d7e478e224502975ec8f220e21:/src/black/cache.py?ds=sidebyside diff --git a/src/black/cache.py b/src/black/cache.py index 3f165de..bca7279 100644 --- a/src/black/cache.py +++ b/src/black/cache.py @@ -35,7 +35,7 @@ def read_cache(mode: Mode) -> Cache: with cache_file.open("rb") as fobj: try: cache: Cache = pickle.load(fobj) - except (pickle.UnpicklingError, ValueError): + except (pickle.UnpicklingError, ValueError, IndexError): return {} return cache