File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -345,13 +345,14 @@ def switchTether(self):
345345def getSUDO ():
346346 output = ""
347347 password = ""
348- while output [:- 1 ] != "0000" :
349- password = getpass .getpass ("Enter sudo password : " )
350- p = subprocess .Popen ("sudo -S echo '0000'" , stdin = subprocess .PIPE ,
348+ if os .geteuid () != 0 :
349+ while output [:- 1 ] != "0000" :
350+ password = getpass .getpass ("Enter sudo password : " )
351+ p = subprocess .Popen ("sudo -S echo '0000'" , stdin = subprocess .PIPE ,
351352 stderr = subprocess .PIPE , stdout = subprocess .PIPE , text = True , shell = True )
352- prompt = p .communicate (password + '\n ' )
353- output = prompt [0 ]
354- DebugPrint (output [:- 1 ])
353+ prompt = p .communicate (password + '\n ' )
354+ output = prompt [0 ]
355+ DebugPrint (output [:- 1 ])
355356
356357
357358class iDevice :
You can’t perform that action at this time.
0 commit comments