Merge branch 'main' into pb-video

This commit is contained in:
leminlimez
2025-03-31 12:45:23 -04:00
4 changed files with 26 additions and 5 deletions

View File

@@ -13,6 +13,8 @@ from devicemanagement.constants import Device, Version
from devicemanagement.data_singleton import DataSingleton
from gui.apply_worker import ApplyAlertMessage
from controllers.path_handler import fix_windows_path
from tweaks.tweaks import tweaks, FeatureFlagTweak, EligibilityTweak, AITweak, BasicPlistTweak, AdvancedPlistTweak, RdarFixTweak, NullifyFileTweak
from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks
from tweaks.posterboard_tweak import PosterboardTweak
@@ -423,7 +425,11 @@ class DeviceManager:
update_label("Restoring to device...")
restore_files(files=files_to_restore, reboot=self.auto_reboot, lockdown_client=self.data_singleton.current_device.ld)
if tmp_pb_dir != None:
tmp_pb_dir.cleanup()
try:
tmp_pb_dir.cleanup()
except Exception as e:
# ignore clean up errors
print(str(e))
msg = "Your device will now restart."
if not self.auto_reboot:
msg = "Please restart your device to see changes."
@@ -431,7 +437,11 @@ class DeviceManager:
update_label("Success!")
except Exception as e:
if tmp_pb_dir != None:
tmp_pb_dir.cleanup()
try:
tmp_pb_dir.cleanup()
except Exception as e2:
# ignore clean up errors
print(str(e2))
show_alert(show_apply_error(e, update_label))
## RESETTING MOBILE GESTALT