[upstream_util, wpiutil] Refactor python scripts (#4614)

Co-authored-by: Sourcery AI <>
Co-authored-by: Vasista Vovveti <vasistavovveti@gmail.com>
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
Ege Akman
2022-11-14 10:11:54 +03:00
committed by GitHub
parent c4e526d315
commit 5a320c326b
3 changed files with 12 additions and 16 deletions

View File

@@ -126,12 +126,12 @@ def overwrite_files(wpiutil_files, llvm_files):
for wpi_file in wpiutil_files:
wpi_base_name = os.path.basename(wpi_file)
if wpi_base_name not in llvm_files:
if wpi_base_name not in unmatched_files_whitelist:
print(f"No file match for {wpi_file}, check if LLVM deleted it")
else:
if wpi_base_name in llvm_files:
shutil.copyfile(llvm_files[wpi_base_name], wpi_file)
elif wpi_base_name not in unmatched_files_whitelist:
print(f"No file match for {wpi_file}, check if LLVM deleted it")
def overwrite_source(wpiutil_root, llvm_root):
llvm_files = flattened_llvm_files(