File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,12 +74,13 @@ def fetch(self):
7474 self .sfr_full_ver = self .get_restore_version ("/System/Volumes/iSCPreboot/SFR/current/RestoreVersion.plist" )
7575
7676 self .login_user = None
77- consoleuser = subprocess .run (["scutil" ],
78- input = b"show State:/Users/ConsoleUser\n " ,
79- stdout = subprocess .PIPE ).stdout .strip ()
80- if b"kCGSSessionUserNameKey : " in consoleuser :
81- self .login_user = (consoleuser .split (b"kCGSSessionUserNameKey : " )[1 ]
82- .split (b"\n " )[0 ].decode ("ascii" ))
77+ scout = subprocess .run (["scutil" ], input = b"show State:/Users/ConsoleUser\n " ,
78+ stdout = subprocess .PIPE ).stdout .strip ()
79+ for line in scout .split (b"\n " ):
80+ if b"kCGSSessionUserNameKey : " in line :
81+ consoleuser = line .split (b"kCGSSessionUserNameKey : " )[1 ].decode ("ascii" )
82+ if consoleuser != "_mbsetupuser" :
83+ self .login_user = consoleuser
8384
8485 def get_nvram_data (self ):
8586 nvram_data = subprocess .run (["nvram" , "-p" ],
You can’t perform that action at this time.
0 commit comments