From 019851f856de7214911f6e7feef96641d1d621aa Mon Sep 17 00:00:00 2001 From: kimpaller Date: Tue, 26 Nov 2024 13:50:02 +0800 Subject: [PATCH] exclude properties.yaml and hashes.txt at empty files check Signed-off-by: kimpaller --- nebula/manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nebula/manager.py b/nebula/manager.py index 1cd69ef..f160b27 100644 --- a/nebula/manager.py +++ b/nebula/manager.py @@ -737,11 +737,16 @@ def _find_boot_files(self, folder): if not os.path.isdir(folder): raise Exception("Boot files folder not found") files = os.listdir(folder) + + # check for empty files res = [] for file in files: path = os.path.join(folder, file) filesize = os.stat(path).st_size + exemption = ["properties.yaml","hashes.txt"] if filesize <= 80: + if file in exemption: + continue res.append(file) if len(res) != 0: raise Exception("Empty files:" + str(res))