From 495a9b6fb920936d74640dfee0e39d246829169d Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 15 Oct 2021 12:22:12 -0500 Subject: [PATCH] Tools - Cleanup all old keys in release/optionals (#8523) --- tools/make.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/make.py b/tools/make.py index 96808c9580..33d57c9f98 100644 --- a/tools/make.py +++ b/tools/make.py @@ -1134,9 +1134,10 @@ See the make.cfg file for additional build options. if ret == 0: print_green("Created: {}".format(os.path.join(private_key_path, key_name + ".biprivatekey"))) print("Removing any old signature keys...") - purge(os.path.join(module_root, release_dir, project, "addons"), "^.*\.bisign$","*.bisign") - purge(os.path.join(module_root, release_dir, project, "optionals"), "^.*\.bisign$","*.bisign") - purge(os.path.join(module_root, release_dir, project, "keys"), "^.*\.bikey$","*.bikey") + for root, _dirs, files in os.walk(os.path.join(module_root, release_dir)): + for file in files: + if file.endswith(".bisign") or file.endswith(".bikey"): + os.remove(os.path.join(root, file)) else: print_error("Failed to create key!")