aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-01-16 13:44:06 -0800
committerXavier Claessens <xclaesse@gmail.com>2019-01-17 13:21:00 -0500
commit8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02 (patch)
treebf25a687e9ab9df7f4f119adfd82d9edfd4bf268 /mesonbuild
parented0ad91f1cf4fa0fbc492a5c6259b74d45bd911e (diff)
downloadmeson-8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02.zip
meson-8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02.tar.gz
meson-8668a4e2ec8b7fc1b441d7c432f6cfcc0f0b4d02.tar.bz2
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.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/coredata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index ef16cae..6fec61d 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(