bug fix in csf restore files

This commit is contained in:
usmannasir 2025-02-28 21:36:22 +05:00
parent 6f28d39a59
commit c497fb43e5
1 changed files with 5 additions and 2 deletions

View File

@ -3589,8 +3589,11 @@ pm.max_spare_servers = 3
for file in FILES:
backup_file = os.path.join(BACKUP_DIR, os.path.basename(file))
if os.path.exists(backup_file):
shutil.copy(backup_file, file)
print(f"Restored: {file}")
try:
shutil.copy(backup_file, file)
print(f"Restored: {file}")
except:
pass
else:
print(f"Backup not found for: {file}")