make.py - cleanup old optional pbos before rename (#6254)

This commit is contained in:
PabstMirror 2018-04-12 12:16:44 -05:00 committed by GitHub
parent 1994e301fd
commit 13d338a789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -432,9 +432,15 @@ def cleanup_optionals(mod):
if (os.path.isfile(src_file_path)): if (os.path.isfile(src_file_path)):
if (os.path.isfile(dst_file_path)):
# print("Cleanuping up old file {}".format(dst_file_path))
os.remove(dst_file_path);
#print("Preserving {}".format(file_name)) #print("Preserving {}".format(file_name))
os.renames(src_file_path,dst_file_path) os.renames(src_file_path,dst_file_path)
if (os.path.isfile(src_sig_path)): if (os.path.isfile(src_sig_path)):
if (os.path.isfile(dst_sig_path)):
# print("Cleanuping up old file {}".format(dst_sig_path))
os.remove(dst_sig_path);
#print("Preserving {}".format(sigFile_name)) #print("Preserving {}".format(sigFile_name))
os.renames(src_sig_path,dst_sig_path) os.renames(src_sig_path,dst_sig_path)
except FileExistsError: except FileExistsError: