Fixed privilege escalation code attempting to run when interacting with user-only menus

Former-commit-id: bcc2a99ab5324a049982bfff83eb191cfd7c0346
Former-commit-id: ce58e4b07a2e5fc26ab34c8ecdc695953b5a2d58
This commit is contained in:
2023-07-08 17:24:57 -04:00
parent 2ac8e8e434
commit 1344aa23f6
+3 -1
View File
@@ -512,7 +512,7 @@ def global_menu(_scr, _device_type, _top_message):
_exit_signal = True _exit_signal = True
if _exit_signal: if _exit_signal:
break break
return False, False, False return None, None, None
# runs initial configuration wizard # runs initial configuration wizard
@@ -582,6 +582,8 @@ def wrapped_entry(_gm_device_type, _gm_top_message='configuration options:'):
_ext_name, _escalator, _action = \ _ext_name, _escalator, _action = \
wrapper(lambda _wrap_stdscr: (use_default_colors(), wrapper(lambda _wrap_stdscr: (use_default_colors(),
global_menu(_wrap_stdscr, _gm_device_type, _gm_top_message)))[1] global_menu(_wrap_stdscr, _gm_device_type, _gm_top_message)))[1]
# only run if privilege escalation is needed
if _action is not None:
if _action: if _action:
# install with privilege escalation (outside of curses) # install with privilege escalation (outside of curses)
from tempfile import gettempdir from tempfile import gettempdir