From b4e6427d047c19922d075952bda03eaee9964d82 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Fri, 27 Sep 2024 21:05:57 +0530 Subject: [PATCH] Fix issues with detect-sudo --- script/detect-sudo/customize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/detect-sudo/customize.py b/script/detect-sudo/customize.py index c963fc23f..b765e875e 100644 --- a/script/detect-sudo/customize.py +++ b/script/detect-sudo/customize.py @@ -1,5 +1,7 @@ from cmind import utils import os, subprocess +import select +import sys def preprocess(i): @@ -45,7 +47,7 @@ def prompt_sudo(): while True: try: r = subprocess.check_output(["sudo", "-p", msg, "echo", "Check sudo"], - stderr=subprocess.STDOUT, timeout=5) + stderr=subprocess.STDOUT, timeout=20) print(r.decode('utf-8')) # Decode bytes to string return 0 except subprocess.TimeoutExpired: