We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d732ec + c97b2a5 commit b23ed0dCopy full SHA for b23ed0d
1 file changed
main.py
@@ -345,13 +345,14 @@ def switchTether(self):
345
def getSUDO():
346
output = ""
347
password = ""
348
- while output[:-1] != "0000":
349
- password = getpass.getpass("Enter sudo password : ")
350
- p = subprocess.Popen("sudo -S echo '0000'", stdin=subprocess.PIPE,
+ if os.geteuid() != 0:
+ while output[:-1] != "0000":
+ password = getpass.getpass("Enter sudo password : ")
351
+ p = subprocess.Popen("sudo -S echo '0000'", stdin=subprocess.PIPE,
352
stderr=subprocess.PIPE, stdout=subprocess.PIPE, text=True, shell=True)
- prompt = p.communicate(password + '\n')
353
- output = prompt[0]
354
- DebugPrint(output[:-1])
+ prompt = p.communicate(password + '\n')
+ output = prompt[0]
355
+ DebugPrint(output[:-1])
356
357
358
class iDevice:
0 commit comments