Skip to content

Commit 825c0bb

Browse files
authored
Recover from corrupted fixed-format cache meta file (#20780)
Various read functions may raise AssertionError in addition to ValueError.
1 parent 19e777a commit 825c0bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def read(cls, data: ReadBuffer, data_file: str) -> CacheMeta | None:
224224
ignore_all=read_bool(data),
225225
plugin_data=read_json_value(data),
226226
)
227-
except ValueError:
227+
except (ValueError, AssertionError):
228228
return None
229229

230230

0 commit comments

Comments
 (0)