gui_main.py: fix Privacy prompt

This commit is contained in:
Mykola Grymalyuk
2022-05-27 11:39:34 -06:00
parent 4a1199cb59
commit 897f89d47c
+9 -5
View File
@@ -1184,14 +1184,18 @@ class wx_python_gui:
self.popup.SetYesNoLabels("Open System Preferences", "Ignore") self.popup.SetYesNoLabels("Open System Preferences", "Ignore")
answer = self.popup.ShowModal() answer = self.popup.ShowModal()
if answer == wx.ID_YES: if answer == wx.ID_YES:
subprocess.Popen( output =subprocess.run(
[ [
"osascript", "-e", "osascript", "-e",
'tell app "System Preferences" to reveal anchor "General" of pane id "com.apple.preference.security"' 'tell app "System Preferences" to reveal anchor "General" of pane id "com.apple.preference.security"',
] "-e", 'tell app "System Preferences" to activate',
],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
) )
time.sleep(5) if output.returncode == 0:
self.OnCloseFrame(None) time.sleep(5)
self.OnCloseFrame(None)
else: else:
self.reboot_system(message="Root Patcher finished successfully\nWould you like to reboot now?") self.reboot_system(message="Root Patcher finished successfully\nWould you like to reboot now?")
self.return_to_main_menu.Enable() self.return_to_main_menu.Enable()