From 5e7bc37fb5eda474e674ec75fd7b06360aeb280f Mon Sep 17 00:00:00 2001 From: x7z4w Date: Sun, 24 Aug 2025 19:12:32 +0200 Subject: [PATCH] Fix crash Signed-off-by: x7z4w --- tools/python/check_store_metadata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/python/check_store_metadata.py b/tools/python/check_store_metadata.py index 644176538..13157a9ac 100755 --- a/tools/python/check_store_metadata.py +++ b/tools/python/check_store_metadata.py @@ -125,7 +125,9 @@ def check_raw(path, max_length): ok = True with open(path, 'r') as f: text = f.read() - if text[-1] == os.linesep: + if not text: + ok = error(path, "empty") + elif text[-1] == os.linesep: text = text[:-1] else: ok = error(path, "missing new line")