From a5f49a6a1fd5ec4bda817906b13324399e810e8c Mon Sep 17 00:00:00 2001 From: Sterling Taylor <166402033+staylorTT@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:36:08 -0500 Subject: [PATCH] Update verify-spdx-headers Adding a check for emtpy files and skipping. Signed-off-by: Sterling Taylor <166402033+staylorTT@users.noreply.github.com> Remove whitespace. --- verify-spdx-headers | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/verify-spdx-headers b/verify-spdx-headers index aa8cd16..555b6c3 100755 --- a/verify-spdx-headers +++ b/verify-spdx-headers @@ -100,11 +100,14 @@ class Index: for file in files: path = os.path.join(root, file) + + # If the file is empty skip. + if os.path.getsize(path) == 0: + continue # If the file is a symlink, don't bother if os.path.islink( path ): continue - # Find the language of the file. language = self.language(path) if language is None: