From 8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 16 Jan 2019 13:44:06 -0800 Subject: [PATCH] coredata: Handle EOFError like UnpicklingError If the coredata file has been truncated, that's pretty much the same as being corrupt, handle that via the same path. --- mesonbuild/coredata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index ef16cae42..6fec61d64 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -643,7 +643,7 @@ def load(build_dir): try: with open(filename, 'rb') as f: obj = pickle.load(f) - except pickle.UnpicklingError: + except (pickle.UnpicklingError, EOFError): raise MesonException(load_fail_msg) except AttributeError: raise MesonException(