From c2f1fdbb605db46dd2ebfc646efe1d189b13887b Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Mon, 15 Apr 2024 17:20:14 +0000 Subject: [PATCH] Scripts: - Updated file mode update in update_license_headers.py script --- scripts/update_license_headers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_license_headers.py b/scripts/update_license_headers.py index 62a166f17..da839ba0a 100644 --- a/scripts/update_license_headers.py +++ b/scripts/update_license_headers.py @@ -87,7 +87,7 @@ def process_file( temp_file_path = file_path + '.temp' replaced = False - file_mode = os.stat(file_path) + file_stat = os.stat(file_path) try: with open(file_path, encoding='UTF-8') as source: with open(temp_file_path, 'w', encoding='UTF-8') as target: @@ -104,7 +104,7 @@ def process_file( file_updated.write(file_path + '\n') os.rename(temp_file_path, file_path) - os.chmod(file_path, file_mode) + os.chmod(file_path, file_stat.st_mode) def main() -> int: with open(FILE_PATH_NO_HEADER, 'w', encoding='UTF-8') as file_no_header: -- GitLab